Companion

object Companion

Properties

Link copied to clipboard
const val ACK_MASK: Int = 65535

ACK_MASK from utp_stream.cpp: seq/ack numbers are 16-bit wrap counters.

Link copied to clipboard

Duration of one base-delay bucket (~1 minute), matching libtorrent's delay-base update.

Link copied to clipboard
const val BASE_DELAY_BUCKETS: Int = 13

Number of live base-delay buckets kept (the rolling window the base-min spans).

Link copied to clipboard
const val DEFAULT_MAX_PAYLOAD: Int = 1400

Initial per-packet payload (MSS) before any PMTU shrinking (1500 - IP/UDP/uTP).

Link copied to clipboard

RTO floor (min_timeout): 500 ms, matching libtorrent's min_timeout.

Link copied to clipboard

Our advertised receive window / the cwnd ceiling (bytes).

Link copied to clipboard

Internal retransmission ticker cadence (ms).

Link copied to clipboard
const val DUP_ACK_LIMIT: Int = 3

Dup-ACK / SACKed-above threshold that triggers a fast retransmit (dup_ack_limit).

Link copied to clipboard
const val INIT_CWND: Int

Initial congestion window: two MSS, the conventional slow-start start.

Link copied to clipboard
const val MAX_BACKOFF_SHIFT: Int = 5

Cap the exponential backoff shift so the timeout can't run away.

Link copied to clipboard
const val MAX_CWND: Int

Cap on cwnd growth (bytes). The peer's advertised wnd_size caps it further (see awaitWindow).

Link copied to clipboard

Absolute ceiling on a single RTO interval (60 s).

Link copied to clipboard
const val MAX_TIMEOUTS: Int = 6

Give up (fail the socket) after this many consecutive RTO retransmits.

Link copied to clipboard
const val MIN_MSS: Int

Floor the discovered MSS can shrink to (mtu_floor): a safe payload for the IPv6 minimum MTU (1280) minus IPv6+UDP+uTP overhead (40+8+20). Below this we stop shrinking, since essentially every path carries at least this.

Link copied to clipboard
const val MSS_SHRINK_STEP: Int = 64

Bytes the MSS drops per shrink step when repeated loss suggests over-MTU packets.

Link copied to clipboard
const val MTU_SHRINK_AFTER: Int = 2

Consecutive RTO rounds before the first MSS shrink (treat the first round as plain loss).

Link copied to clipboard
const val SACK_MAX_BITS: Int = 256

Max bits a SACK bitmask can carry (32 bytes × 8), per libtorrent.

Link copied to clipboard

LEDBAT target queuing delay: 100 ms, the BEP-29 / libtorrent target_delay.