code wiki / (root) / nx_torrent_stream_gate.nx

nx_torrent_stream_gate.nx

buildroot/runtime/nx_torrent_stream_gate.nx

2792 B59 linesdepth 6pulls 12 transitivereach 0 importersview sourcekind gate/prooftopic torrent
docsdependenciesstructsconstsfunctions

about

nx_torrent_stream_gate.nx -- verify the stream-while-downloading logic against REAL data, with NO live daemon (importing nx_torrent_daemon strips its main, exposing the pure helpers). exit 0 = pass. T1 d_video_extent on the operator's real 300MIUM download.meta -> the .mp4's exact (offset,length) T2 d_contig_bytes computes the contiguous downloaded prefix (>0) T3 d_parse_range "bytes=100-199" -> start/end exact T4 d_parse_range "bytes=500-" (open-ended) -> start, end=-1 T5 NEG-CONTROL: a request with no Range header -> not present (0)

dependencies 2 imports · 0 importers

nx_torrent_daemon.nx nx_assert.nx nx_torrent_stream_gate.nx

imports: nx_torrent_daemon.nxnx_assert.nx

imported by: nobody (leaf or entry point)

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

main d_path d_puts d_read_file sys_openat_rd sys_read sys_close nx_puts_err sys_write nx_puti_err sys_mmap nxa_die sys_write ↻ sys_exit nxa_lock_take nxa_lock_addr sys_write ↻ nxa_lock_give nxa_lock_addr ↻ nxa_report_overrun sys_write ↻ nxa_dump_printable sys_write ↻ nxa_dump_sizes sys_write ↻ sys_write ↻ d_video_extent nx_bc_dict_get sys_mmap ↻ nx_bc_str _bc_is_digit _bc_bytes_eq nx_bc_skip _bc_is_digit ↻ sys_mmap ↻ nx_bc_int _bc_is_digit ↻ nx_bc_skip ↻ d_contig_bytes d_path ↻

structs

none

consts

none

functions

13func main() -> i64