code wiki / _hdl_build / nx_intl_h2h.nx

nx_intl_h2h.nx

buildroot/runtime/_hdl_build/nx_intl_h2h.nx

9449 B150 linesdepth 2pulls 2 transitivereach 0 importersview sourcekind tool
docsdependenciesstructsconstsfunctions

about

nx_intl_h2h.nx -- INTERNATIONAL head-to-head: our pipelines vs the rival TRANSPORT CLASSES on the paths that matter to the family (operator 2026-07-02: "benchmark against other systems capabilities and speeds like telegram etc for international interactions as those will be key"). EXTENDS the proven nx_room_perf_measure harness (same frame-by-frame physics, same honesty rules) to FOUR grounded intercontinental profiles x FOUR transport classes: (A) OURS-LIVE TCP relay + JPEG: a lost segment head-of-line blocks (+1 RTT) -- today's wire. (B) OURS-TARGET RS-FEC(k=8,m=2) over datagram (nx_room_fec_relay, BUILT, unwired): <=m losses recovered in-flight, no retransmit. (C) RIVAL-UDP Telegram/Zoom/WhatsApp CALL class: UDP + concealment + low jitter buffer (MODELED from banked rival_telegram/rival_mtproto/conn_webrtc -- concealment counts as smooth, the GENEROUS reading for rivals). (D) RIVAL-TCPFB the SAME rivals behind hard NATs/firewalls: TCP relay fallback -- identical head-of-line physics to (A). International hotel/corp/mobile nets hit this a lot. Profiles (grounded conn_subcable/conn_rtt + the Minsk-Dallas 150ms already banked): P1 Texas<->Minsk 150ms/2% P2 Texas<->Kyiv 160ms/5% P3 Texas<->Manila 200ms/3% P4 intl mobile LTE 180ms/8% jitter+-40. Also computes OUR voice mouth-to-ear per profile with TODAY's 21ms capture framing. HONEST: simulated links + real mechanisms; rival classes are MODELED not live-captured -- the live-capture h2h stays on the BEHIND list. GREEN = measurement SOUND (controls hold), verdict printed honestly. Log -> knowledge/status/intl_h2h.log. expect_exit: 0 license_tier: ORIGINAL

dependencies 1 imports · 0 importers

nx_syscalls.nx nx_intl_h2h.nx

imports: nx_syscalls.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main mw sys_write sys_mmap profile sys_mmap ↻ lcg measure mw ↻ mwn sys_mmap ↻ sys_write ↻ mwn ↻ sys_openat_append sys_close

structs

none

consts

22const IH_MAGIC_1103515245: i64 = 1103515245
23const IH_MAGIC_12345: i64 = 12345
24const IH_MAGIC_1000000000: i64 = 1000000000
25const IH_MAGIC_880301: i64 = 880301
26const IH_MAGIC_424242: i64 = 424242
27const IH_MAGIC_777001: i64 = 777001
28const IH_MAGIC_555002: i64 = 555002
30const IH_LOG: *u8 = "knowledge/status/intl_h2h.log"

functions

32func mw(fd: i64, s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(fd,s,n); return 0 }
called by 2: profilemain calls 1: sys_write
33func mwn(fd: i64, v: i64) -> i64 { let bb: *u8=sys_mmap(28); var m: i64=v; if m<0{m=0-m;sys_write(fd,"-" as *u8,1)} let t: *u8=sys_mmap(28); var k: i64=0; if m==0{t[0]=48 as u8;k=1} while m>0{t[k]=(48+(m%10)) as u8;m=m/10;k=k+1} var i: i64=0; while i<k{bb[i]=t[k-1-i];i=i+1} sys_write(fd,bb,k); return 0 }
called by 2: profilemain calls 2: sys_mmapsys_write
34func lcg(s: *i64) -> i64 { s[0]=(s[0]*IH_MAGIC_1103515245+IH_MAGIC_12345) & 0x7fffffff; return (s[0]>>13) & 0x7fff }
called by 1: profile
38func measure(lost: *i64, jit: *i64, NF: i64, intv: i64, oneway: i64, rtt: i64, playout: i64, k: i64, m: i64, mode: i64, res: *i64) -> i64
called by 1: profile
72func profile(tag: *u8, oneway: i64, rtt: i64, jmax: i64, loss_pct: i64, seed: i64, out: *i64) -> i64
called by 1: main calls 5: sys_mmaplcgmeasuremwmwn
107func main() -> i64