incRefcount

fun incRefcount(index: Int, peerId: Any? = null)

Increment the availability of index for peerId (a HAVE message). Mirrors piece_picker::inc_refcount(piece_index_t, torrent_peer const*). The peer token is unused here (libtorrent only uses it for debug refcount sets) but kept in the signature for symmetry with the bitfield overload.


fun incRefcount(bitmask: Bitfield, peerId: Any? = null)

Increment availability for every piece in bitmask for peerId (a BITFIELD message). If the bitmask covers every piece it is treated as a seed and routed through incRefcountAll. Mirrors the bitfield inc_refcount.