Companion

object Companion

Properties

Link copied to clipboard
const val BLOCK_SIZE: Int
Link copied to clipboard
const val DEFAULT_PRIORITY: Int = 4
Link copied to clipboard
const val KEEP_ALIVE_TICKS: Int = 75

Keep-alives go out roughly every 75 s of ticks, like write_keepalive's cadence.

Link copied to clipboard

Pieces a peer may contribute to that fail their hash before it is banned.

Link copied to clipboard
const val MAX_INBOUND_REQUESTS: Int = 2000

Max outstanding inbound requests a single peer may have pending against us before it is treated as flooding and disconnected (libtorrent's in-request-queue cap).

Link copied to clipboard

Hard ceiling on the byte length of an inbound request. libtorrent rejects requests larger than a single block; we bound by 128 KiB defensively.

Link copied to clipboard
const val METADATA_PIECE: Int
Link copied to clipboard
const val MIN_REQUEST_QUEUE: Int = 2

min_request_queue: the dynamic queue never drops below this (except snub/end-game).

Link copied to clipboard
const val PEX_INTERVAL_SECONDS: Int = 60

PEX gossip cadence: libtorrent's ut_pex_plugin ticks once a minute (60 s min).

Link copied to clipboard
const val PIECE_MESSAGE_OVERHEAD: Int = 13

Frame overhead of a piece message (4 length + 1 id + 8 piece/begin).

Link copied to clipboard
const val SLOW_START_SLACK_BYTES: Int = 5000

Slow start ends when a tick grows payload by less than this (upstream's 5000-byte slack).

Link copied to clipboard
const val UTP_CONNECT_TIMEOUT_MS: Long = 3000

How long an outgoing µTP SYN may wait before falling back to TCP.