code wiki / (root) / nx_galx_seek_test.nx

nx_galx_seek_test.nx

buildroot/runtime/nx_galx_seek_test.nx

3966 B64 linesdepth 6pulls 7 transitivereach 0 importersview sourcekind gate/prooftopic galx
docsdependenciesstructsconstsfunctions

about

nx_galx_seek_test.nx -- SOVEREIGN HTTP test client for the gallery daemon (replaces curl). Connects to 127.0.0.1:18090, GETs argv[1], prints status+byte count, and writes the response BODY (after the \r\n\r\n header terminator) to argv[2] if given (so a /vid seek stream can be fed to nx_mp4_probe). Reuses nx_http_get_ua (the bits-up plain-TCP GET). license_tier: ORIGINAL

dependencies 3 imports · 0 importers

nx_http_get_ua.nx nx_connect.nx nx_syscalls.nx nx_galx_seek_test.nx

imports: nx_http_get_ua.nxnx_connect.nxnx_syscalls.nx

imported by: nobody (leaf or entry point)

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

main pr sys_write sys_mmap mkaddr sys_clock_now_us sys_now_us sys_mmap ↻ sys_clock_gettime_mono range_get sys_socket nx_connect_bounded nx_fcntl sys_connect sys_mmap ↻ sys_poll sys_close sys_mmap ↻ wput sys_write ↻ sys_read nx_http_get_ua sys_socket ↻ sys_set_socket_timeout sys_mmap ↻ sys_setsockopt sys_munmap nx_connect_bounded ↻ sys_close ↻ sys_mmap ↻ nx_http_ua_build_request _hua_lit nx_str_len _hua_buf sys_write ↻ sys_read ↻ prn sys_mmap ↻ sys_write ↻ body_off

structs

none

consts

none

functions

9func pr(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 }
called by 1: main calls 1: sys_write
10func prn(v: i64) -> i64 { var m: i64=v; if m<0 {m=0-m} let b: *u8=sys_mmap(32); var i: i64=32; if m==0 {i=i-1; b[i]=(48 as u8)} while m>0 { let q: i64=m/10; i=i-1; b[i]=((48+(m-q*10)) as u8); m=q } return sys_write(1, ((b as i64)+i) as *u8, 32-i) }
called by 1: main calls 2: sys_mmapsys_write
12func mkaddr(buf: *u8, port: i64) -> i64
called by 1: main
19func body_off(b: *u8, n: i64) -> i64 { var i: i64=0; while i+3<n { if b[i]==(13 as u8) { if b[i+1]==(10 as u8) { if b[i+2]==(13 as u8) { if b[i+3]==(10 as u8) { return i+4 } } } } i=i+1 } return 0-1 }
called by 1: main
20func wput(b: *u8, o: i64, s: *u8) -> i64 { var i: i64=0; while s[i]!=(0 as u8){ b[o]=s[i]; o=o+1; i=i+1 } return o }
called by 1: range_get
22func range_get(addr: *u8, path: *u8, rng: *u8, out: *u8, cap: i64, stt: *i64) -> i64
36func main(argc: i64, argv: *i64) -> i64