code wiki / (root) / nx_edge_serve_static.nx

nx_edge_serve_static.nx

buildroot/runtime/nx_edge_serve_static.nx

3784 B112 linesdepth 12pulls 33 transitivereach 5 importersview sourcekind librarytopic edge
docsdependenciesstructsconstsfunctions

about

nx_edge_serve_static.nx -- substrate primitive that turns a CONNECTED Tls13ServerSession into a one-shot HTTPS serving call. What this ships: nx_edge_build_http_response(content, content_len, out, out_cap) Builds a minimal HTTP/1.1 200 OK response with Content-Length header and the given body. Returns total bytes written. nx_edge_serve_static_response(session, content, content_len, out, out_cap) After handshake completes (state CONNECTED), this builds an HTTP/1.1 response wrapping `content` and AEAD-encrypts it as a TLS application_data record under server_app_traffic_key + iv. Returns total bytes written to `out` (the wire bytes to send to the client over the TCP socket). This is the final substrate brick between the substrate's TLS 1.3 server arc (10 stones + app_send/recv shipped) and an operator- runnable HTTPS daemon. Operator integration steps documented in docs/NISHIFAMILY_DEPLOY_RUNBOOK_2026_05_20.md. license_tier: ORIGINAL

dependencies 3 imports · 3 importers

nx_syscalls.nx nx_tls13_server_session.nx nx_tls13_server_session_app_data.n nx_edge_serve_static.nx nx_edge_daemon.nx nx_edge_serve_static_test.nx nx_pub_tls_serve.nx

imports: nx_syscalls.nxnx_tls13_server_session.nxnx_tls13_server_session_app_data.nx

imported by: nx_edge_daemon.nxnx_edge_serve_static_test.nxnx_pub_tls_serve.nx

structs

none

consts

none

functions

28func edge_put_cstr(out: *u8, pos: i64, s: *u8) -> i64
40func edge_put_int(out: *u8, pos: i64, value: i64) -> i64
65func nx_edge_build_http_response(
92func nx_edge_serve_static_response(