code wiki / (root) / nx_quic_recovery.nx

nx_quic_recovery.nx

buildroot/runtime/nx_quic_recovery.nx

2916 B57 linesdepth 2pulls 2 transitivereach 1 importersview sourcekind tooltopic quic
docsdependenciesstructsconstsfunctions

about

nx_quic_recovery.nx -- RUNG 7 of the sovereign QUIC transport: loss detection + congestion control (RFC 9002). RTT estimation (sec 5), packet/time-threshold loss detection (sec 6), and NewReno congestion control (sec 7) -- the machinery that decides WHEN a datagram is lost and HOW FAST to send, which is exactly where FEC vs ARQ diverges on the lossy Belarus<->Texas link. All integer (microseconds, bytes) -- no float, the Nishi way. license_tier: ORIGINAL

dependencies 1 imports · 1 importers

nx_syscalls.nx nx_quic_recovery.nx nx_quic_recovery_test.nx

imports: nx_syscalls.nx

imported by: nx_quic_recovery_test.nx

structs

none

consts

27const QC_MAX_DATAGRAM: i64 = 1200
28const QC_INIT_CWND: i64 = 12000 // min(10*max, max(2*max, 14720)) = min(12000,14720) = 12000
29const QC_SSTHRESH_INF: i64 = 9223372036854775807
45const QC_PKT_THRESHOLD: i64 = 3 // kPacketThreshold

functions

9func quic_rtt_init(st: *i64) -> i64 { st[0]=0; st[1]=0; st[2]=0; st[3]=0; return 0 }
called by 1: main
10func quic_rtt_sample(st: *i64, latest_rtt: i64, ack_delay: i64) -> i64
called by 1: main
30func quic_cc_init(cc: *i64) -> i64 { cc[0] = QC_INIT_CWND; cc[1] = QC_SSTHRESH_INF; return 0 }
called by 1: main
31func quic_cc_on_ack(cc: *i64, bytes_acked: i64) -> i64
called by 1: main
36func quic_cc_on_loss(cc: *i64) -> i64
called by 1: main
46func quic_pkt_lost_by_threshold(pn: i64, largest_acked: i64) -> i64
called by 1: main
51func quic_loss_delay(smoothed_rtt: i64, latest_rtt: i64) -> i64
called by 1: main
57func main() -> i64 { return 0 }