HandshakeResult

class HandshakeResult(val peerId: Sha1Hash, val reserved: ByteArray, val supportsDht: Boolean, val supportsFast: Boolean, val supportsExtended: Boolean)

The validated outcome of PeerConnection.performHandshake: the remote peer's id and its 8 reserved capability bytes, with the three feature flags BitTorrent negotiates through them decoded for convenience. Mirrors what libtorrent stashes in set_pid() + m_reserved_bits after a successful handshake.

Constructors

Link copied to clipboard
constructor(peerId: Sha1Hash, reserved: ByteArray, supportsDht: Boolean, supportsFast: Boolean, supportsExtended: Boolean)

Properties

Link copied to clipboard

The remote peer's 20-byte id.

Link copied to clipboard

The raw 8 reserved bytes as they arrived.

Link copied to clipboard

Peer set the DHT bit (BEP-5).

Link copied to clipboard

Peer set the extension-protocol bit (BEP-10).

Link copied to clipboard

Peer set the Fast-extension bit (BEP-6).