pub struct PeerInfo {Show 16 fields
pub addr: SocketAddr,
pub client: String,
pub peer_choking: bool,
pub peer_interested: bool,
pub am_choking: bool,
pub am_interested: bool,
pub download_rate: u64,
pub upload_rate: u64,
pub num_pieces: u32,
pub source: PeerSource,
pub supports_fast: bool,
pub upload_only: bool,
pub snubbed: bool,
pub connected_duration_secs: u64,
pub num_pending_requests: usize,
pub num_incoming_requests: usize,
}Expand description
Per-peer details exported for client UI introspection.
Fields§
§addr: SocketAddrRemote peer address (IP + port).
client: StringClient identification string (from extension handshake v field, or empty).
peer_choking: boolWhether the peer is choking us.
peer_interested: boolWhether the peer is interested in our data.
am_choking: boolWhether we are choking the peer.
am_interested: boolWhether we are interested in the peer’s data.
download_rate: u64Current download rate from this peer in bytes/sec.
upload_rate: u64Current upload rate to this peer in bytes/sec.
num_pieces: u32Number of pieces the peer has (bitfield population count).
source: PeerSourceHow the peer was discovered.
supports_fast: boolWhether the peer supports BEP 6 Fast Extension.
upload_only: boolWhether the peer declared upload-only status (BEP 21).
snubbed: boolWhether the peer is snubbed (no data for snub_timeout_secs).
connected_duration_secs: u64Seconds since the peer connection was established.
num_pending_requests: usizeNumber of outstanding piece requests to this peer.
num_incoming_requests: usizeNumber of incoming piece requests from this peer.