code wiki / _hdl_build / _eg_httpd_ref.nx
_eg_httpd_ref.nx
buildroot/runtime/_hdl_build/_eg_httpd_ref.nx
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
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
structs
| none |
consts
| none |
functions
| 10 | func eh_find(buf: *u8, n: i64, pat: *u8, plen: i64) -> i64 called by 1: main |
| 24 | func main() -> i64 |