code wiki / (root) / nx_circulation.nx

nx_circulation.nx

buildroot/runtime/nx_circulation.nx

2856 B86 linesdepth 2pulls 2 transitivereach 1 importersview sourcekind library
docsdependenciesstructsconstsfunctions

about

nx_circulation.nx -- reliable byte stream with flow control (TCP class). Biology: cardiovascular circulation regulates blood flow via heart rate + vessel diameter + smooth-muscle tone. Substrate: reliable ordered byte stream with backpressure (window-based flow control).

dependencies 2 imports · 1 importers

nx_syscalls.nx nx_tier.nx nx_circulation.nx nx_circulation_test.nx

imports: nx_syscalls.nxnx_tier.nx

imported by: nx_circulation_test.nx

structs

16struct NxStream

consts

10const NX_CR_V_OK: nx_int = 0
11const NX_CR_V_BLOCKED: nx_int = 1 // would exceed window
12const NX_CR_V_CLOSED: nx_int = 2
13const NX_CR_V_NULL: nx_int = 3
14const NX_CR_V_N: nx_int = 4
26const NX_CR_BYTES: nx_int = 48
27const NX_CR_STATE_OPEN: nx_int = 0
28const NX_CR_STATE_HALF_CLOSED: nx_int = 1
29const NX_CR_STATE_CLOSED: nx_int = 2

functions

31func nx_cr_v_is_valid(v: nx_int) -> nx_int
called by 1: main
37func nx_cr_stream_new(stream_id: nx_int, window_size: nx_size) -> *NxStream
called by 1: main calls 1: sys_mmap
51func nx_cr_send(s: *NxStream, bytes: nx_size) -> nx_int
called by 1: main
61func nx_cr_ack(s: *NxStream, bytes: nx_size) -> nx_int
called by 1: main
69func nx_cr_receive(s: *NxStream, bytes: nx_size) -> nx_int
called by 1: main
76func nx_cr_available_window(s: *NxStream) -> nx_size
called by 1: main
82func nx_cr_close(s: *NxStream) -> nx_int
called by 1: main