PeerEndpoint

data class PeerEndpoint(val host: String, val port: Int)

A single peer endpoint returned by a tracker: an IP address (in dotted-quad or colon-hex string form) and a TCP port. This is the flattened equivalent of libtorrent's ipv4_peer_entry / ipv6_peer_entry (peer.hpp); KiteTorrent's peer layer keeps addresses as host strings (see peer.PeerAddress), so the compact 6-byte (v4) / 18-byte (v6) tracker encodings are decoded into strings here.

Constructors

Link copied to clipboard
constructor(host: String, port: Int)

Properties

Link copied to clipboard

the peer's IP literal, e.g. "10.0.0.1" or "2001:db8::1".

Link copied to clipboard
val port: Int

the peer's TCP port (1..65535).