expose more info through peer_info

This commit is contained in:
Arvid Norberg
2008-01-10 22:13:23 +00:00
parent 9fca960d3c
commit 3a727e99ff
7 changed files with 72 additions and 28 deletions

View File

@@ -669,10 +669,8 @@ namespace libtorrent
// request is in progress.
bool m_writing;
bool m_reading;
#ifndef NDEBUG
bool m_requested_write_quota;
bool m_requested_read_quota;
#endif
// if set to non-zero, this peer will always prefer
// to request entire n pieces, rather than blocks.

View File

@@ -57,7 +57,11 @@ namespace libtorrent
queued = 0x100,
on_parole = 0x200,
seed = 0x400,
optimistic_unchoke = 0x800
optimistic_unchoke = 0x800,
writing = 0x1000,
reading = 0x2000,
waiting_write_quota = 0x4000,
waiting_read_quota = 0x8000
#ifndef TORRENT_DISABLE_ENCRYPTION
, rc4_encrypted = 0x100000,
plaintext_encrypted = 0x200000
@@ -96,8 +100,10 @@ namespace libtorrent
// time since last download or upload
time_duration last_active;
// the size of the send buffer for this peer
// the size of the send buffer for this peer, in bytes
int send_buffer_size;
// the number bytes that's actually used of the send buffer
int used_send_buffer;
// the number of failed hashes for this peer
int num_hashfails;