PeerAddress
A parsed IP address: the pure-Kotlin stand-in for libtorrent's libtorrent::address (Boost.Asio) inside the peer-list port.
KiteTorrent v0 deliberately keeps a peer's address as a host string (see TorrentPeer.host); there are no socket types in commonMain. But several faithful behaviours genuinely need the address in its numeric, network-byte-order form: BEP 40 peer priority (peerPriority), local-address preference (isLocal), IPv6 link-local rejection, and the canonical address ordering that keeps the peer list sorted. PeerAddress provides exactly that: it parses a dotted-quad / colon-hex literal into its raw bytes and exposes the predicates those behaviours require, and nothing more.
This class understands only numeric literals (it never resolves DNS, which is a platform concern). parseOrNull returns null for anything it cannot parse as a literal IPv4 or IPv6 address, and callers treat such hosts as opaque.
Properties
True for the "unspecified" / any address (0.0.0.0 or ::). This is the analogue of comparing against a default-constructed address. libtorrent's add_peer ignores such endpoints.
True for an IPv6 link-local address (fe80::/10): the port of address_v6::is_link_local. libtorrent refuses to add such peers in peer_list::add_peer because they require a scope/interface to be usable. Always false for IPv4.
Functions
Total ordering over addresses matching address::operator<: IPv4 sorts before IPv6 (fewer bytes first), and within a family the comparison is the unsigned lexicographic order of the network-byte-order bytes. This is the ordering PeerList keeps its peer vector in.