code wiki / _hdl_build / _eg_httpd_ref.nx

_eg_httpd_ref.nx

buildroot/runtime/_hdl_build/_eg_httpd_ref.nx

2956 B80 linesdepth 2pulls 2 transitivereach 0 importersview sourcekind tooltopic eg
docsdependenciesstructsconstsfunctions

about

_eg_httpd_ref.nx -- HAND REFERENCE (written ONCE, scratch) for the PROOF-2 daemon-class target. This is the byte-identical TARGET the generalized walker (nx_eg) must reproduce from a STRUCTURAL spec. It is NOT a constant-variant of nx_eoe's nested-counting-loop shape: its control flow is a real socket->bind->listen->`while accept`->`if cfd<0 continue`->fork->flat-if route dispatch->send, modeled on the live daemons nx_http_server.nx (listen/accept) + nx_sites_daemon.nx (accept/fork/flat-if). Plain NishiLang nx_cc compiles today; loopback bind on a chosen port; GET /health -> 200, default 404. Dialect rails honored: flat-ifs only (LM-002, no else-if chaining), no &&/|| (LM-001), mask-after-shift for the port bytes (LM-005). license_tier: ORIGINAL

dependencies 1 imports · 0 importers

nx_syscalls.nx _eg_httpd_ref.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 sys_mmap sys_socket sys_setsockopt sys_bind sys_listen sys_accept sys_fork sys_close sys_read eh_find sys_write sys_exit

structs

none

consts

none

functions

10func eh_find(buf: *u8, n: i64, pat: *u8, plen: i64) -> i64
called by 1: main
24func main() -> i64