nx_https_ka_probe.nx
buildroot/runtime/nx_https_ka_probe.nx
about
nx_https_ka_probe.nx -- R4 ISOLATED PROOF: HTTP/1.1 KEEP-ALIVE connection reuse over ONE TLS session.
Operator 2026-07-01 chose R4 (connection reuse). nx_https_get_complete has 30 callers -> CANNOT modify it.
So this is a SELF-CONTAINED probe that replicates the send/read loop with a "Connection: keep-alive" request and
sends TWO GETs over ONE handshake -> proves the ~300ms certloop is paid ONCE for N fetches. Touches nothing existing.
If GREEN, the next step is a connection-pool layer in the research engine (also isolated). license_tier: ORIGINAL
expect_exit: 0
dependencies 13 imports · 0 importers
diagram shows first 10 each side; +3 more imports, +0 more importers in the complete lists below.
imports: nx_syscalls.nxnx_tls13.nxnx_tls13_record.nxnx_tls13_read_record_from_fd.nxnx_tls13_client_session.nxnx_x509_trust_store.nxnx_trust_store_load_from_certdata.nxnx_tls13_client_validate_certificate.nxnx_tls13_client_session_run.nxnx_url.nxnx_https_url_for_fetch.nxnx_https_url_connect.nxnx_http_response_parse.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| 20 | const K_MAGIC_4096: i64 = 4096 |
| 21 | const K_MAGIC_16645: i64 = 16645 |
| 22 | const K_MAGIC_4194304: i64 = 4194304 |
functions
| 24 | func kp(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 } |
| 25 | func kn(v: i64) -> i64 { let b: *u8=sys_mmap(28); var m: i64=v; if m<0{m=0} 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{b[i]=t[k-1-i];i=i+1} sys_write(1,b,k); return 0 } |
| 26 | func ka_write_n(fd: i64, buf: *u8, n: i64) -> i64 { var off: i64=0; while off<n { let w: i64=sys_write(fd,(buf as i64+off) as *u8,n-off); if w<=0 {return 0-1} off=off+w } return 0 } |
| 29 | func ka_cat(out: *u8, o: i64, s: *u8) -> i64 { var j: i64=0; while s[j]!=(0 as u8) { out[o]=s[j]; o=o+1; j=j+1 } return o } called by 1: ka_build_req |
| 30 | func ka_build_req(path: *u8, path_len: i64, host: *u8, host_len: i64, out: *u8) -> i64 |
| 41 | func ka_hdr_end(buf: *u8, n: i64) -> i64 { var i: i64=0; while i+4<=n { if buf[i]==(13 as u8){if buf[i+1]==(10 as u8){if buf[i+2]==(13 as u8){if buf[i+3]==(10 as u8){return i}}}} i=i+1 } return 0-1 } called by 1: ka_get |
| 42 | func ka_lc(c: i64) -> i64 { if c>=65 { if c<=90 { return c+32 } } return c } called by 1: ka_clen |
| 43 | func ka_clen(buf: *u8, hdr_end: i64) -> i64 |
| 69 | func ka_get(s: *Tls13ClientSession, fd: i64, path: *u8, path_len: i64, host: *u8, host_len: i64, out_buf: *u8, out_cap: i64) -> i64 |
| 116 | func main() -> i64 |