nx_edge_serve_static.nx
buildroot/runtime/nx_edge_serve_static.nx
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
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
| 28 | func edge_put_cstr(out: *u8, pos: i64, s: *u8) -> i64 called by 1: nx_edge_build_http_response |
| 40 | func edge_put_int(out: *u8, pos: i64, value: i64) -> i64 |
| 65 | func nx_edge_build_http_response( |
| 92 | func nx_edge_serve_static_response( |