code wiki / _hdl_build / nx_vroom_daemon.nx

nx_vroom_daemon.nx

buildroot/runtime/_hdl_build/nx_vroom_daemon.nx

16535 B352 linesdepth 4pulls 7 transitivereach 0 importersview sourcekind servicetopic vroom
docsdependenciesstructsconstsfunctions

about

nx_vroom_daemon.nx -- sovereign video-room daemon, PLAIN HTTP on loopback :8446, fronted by nginx (the Synology edge terminates the family TLS; operator chose the clean nishifamily.com/video URL). nginx->TLS-backend failed (OpenSSL rejects nx_tls13's ServerHello with "unsolicited extension"), so the daemon speaks plain HTTP to nginx. The media logic stays 100% sovereign: vr_handle (nx_vroom) + nx_room_relay over shared-mmap, server-relay = no WebRTC/STUN/TURN/WebSocket. Built nx_cc->nxasm (no gcc/.sh). Build: _offc/nx_sov_build_run.elf nx_vroom_daemon license_tier: ORIGINAL

dependencies 5 imports · 0 importers

nx_syscalls.nx nx_http_server.nx nx_room_relay.nx nx_vroom.nx nx_room_stream.nx nx_vroom_daemon.nx

imports: nx_syscalls.nxnx_http_server.nxnx_room_relay.nxnx_vroom.nxnx_room_stream.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 nx_http_server_addr_any nx_http_server_make_sockad nx_http_server_listen sys_ignore_sigpipe sys_mmap ↻ sys_socket sys_mmap ↻ sys_setsockopt sys_bind sys_close sys_listen sys_write vd_strlen sys_mmap_shared rr_init sys_read_file sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_close ↻ vd_build_resp vd_apps vd_app vd_strlen ↻ vd_wdec vd_app ↻ sys_set_socket_timeout sys_mmap ↻ sys_setsockopt ↻ sys_munmap sys_wait4 sys_accept_with_addr sys_fork sys_close ↻ vd_recv sys_read ↻ vr_contains

structs

none

consts

14const VR_MAGIC_8192: i64 = 8192
15const VR_MAGIC_54000: i64 = 54000
16const VR_MAGIC_131072: i64 = 131072
18const VR_PORT: i64 = 8446
19const VR_CLIENT: *u8 = "/volume1/homes/elderwesto/nishihost/vroom_client.html" as *u8
20const VR_PLAINCAP: i64 = 131072
21const VR_OUTCAP: i64 = 262144
22const VR_MAXCHILD: i64 = 64
23const VR_MAXREQ: i64 = 512
24const VR_N: i64 = 16
25const VR_SB: i64 = 65536
26const VR_TTL: i64 = 8000
27const VR_BUDGET: i64 = 1000000000
28const CHAT_CAP: i64 = 128
29const CHAT_TEXTMAX: i64 = 256
30const CHAT_SLOT: i64 = 288
31const VR_PAGE_BODY: *u8 = "<!DOCTYPE html><html><head><meta charset=\"utf-8\"><title>Nishi Family Video</title></head><body style=\"font-family:system-ui;background:#0a0a0c;color:#e6e6ec;text-align:center;padding:8vh\"><h1>Nishi Family Video</h1><p>sovereign daemon live (client file missing)</p></body></html>" as *u8

functions

33func vd_strlen(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} return n }
34func vd_app(dst: *u8, off: i64, src: *u8, n: i64) -> i64 { var i: i64=0; while i<n { dst[off+i]=src[i]; i=i+1 } return off+n }
35func vd_apps(dst: *u8, off: i64, s: *u8) -> i64 { return vd_app(dst, off, s, vd_strlen(s)) }
36func vd_wdec(dst: *u8, off: i64, v: i64) -> i64
44func vd_build_resp(out: *u8, ctype: *u8, body: *u8, body_len: i64) -> i64
called by 1: main calls 3: vd_appsvd_wdecvd_app
55func vd_recv(cfd: i64, buf: *u8, cap: i64) -> i64
80func vd_write_all(cfd: i64, buf: *u8, n: i64) -> i64
95func vd_stream(cfd: i64, rr_st: *i64, rr_arena: *u8, rm: i64, pr: i64, ttl: i64,
153func vd_apost(cfd: i64, plain: *u8, pn: i64, rr_st: *i64, rr_arena: *u8, now: i64) -> i64
168func vd_rd_i64(b: *u8, o: i64) -> i64 { var v: i64=0; var i: i64=0; while i<8 { v = v | ((b[o+i] as i64) << (i*8)); i=i+1 } return v }
called by 1: vd_chat_log
170func vd_qparam_int(req: *u8, n: i64, key: *u8, keyn: i64) -> i64
called by 1: vd_chat_log
185func vd_chat_post(cfd: i64, plain: *u8, pn: i64, meta: *i64, ring: *u8) -> i64
209func vd_chat_log(cfd: i64, plain: *u8, pn: i64, meta: *i64, ring: *u8, out: *u8) -> i64
246func main() -> i64