rank

fun rank(external: ExternalIp, externalPort: Int): Int

The BEP 40 rank of this peer relative to our external address. The port of torrent_peer::rank. Computed lazily and cached in peerRank. Returns 0 if either our address (of the matching family) or this peer's address is unknown, which makes ranking a no-op tie for non-literal hosts.

Parameters

external

our external IP, used to pick our address of this peer's family.

externalPort

the port to pair with our address (our listen port).