code wiki / _hdl_build / nx_mp_serve.nx
nx_mp_serve.nx
buildroot/runtime/_hdl_build/nx_mp_serve.nx
about
nx_mp_serve.nx -- the RUNNABLE sovereign multiplayer daemon: serves the game (pets3d.html + wasm) AND the
player-state relay (/pstate POST, /roster GET) on one port. Socket/bind/listen + accept/FORK loop (mirrors
nx_arcade_serve, proven live), with the relay in SHARED mmap so every forked handler sees the same rooms.
All request logic = nx_mp_daemon (gate-proven). The browser host only memcpy's + calls gi_net_* -- no JS logic.
Build: ./_offc/nx_sov_build_run.elf nx_mp_serve (it backgrounds -- the server loops). license_tier: ORIGINAL
dependencies 2 imports · 0 importers
imports: nx_syscalls.nxnx_mp_daemon.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
| 8 | const MPS_MAGIC_7702: i64 = 7702 |
| 9 | const MPS_MAGIC_8192: i64 = 8192 |
| 10 | const MPS_MAGIC_1024: i64 = 1024 |
| 11 | const MPS_MAGIC_8000: i64 = 8000 |
| 21 | const MPS_MAX_CHILDREN: i64 = 32 |
functions
| 23 | func mps_slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n } called by 1: main |
| 24 | func mps_wstr(buf: *u8, off: i64, s: *u8) -> i64 { var i: i64 = 0; while s[i] != (0 as u8) { buf[off + i] = s[i]; i = i + 1 } return off + i } called by 1: mps_serve |
| 25 | func mps_wn(buf: *u8, off: i64, v: i64) -> i64 |
| 32 | func mps_eq(a: *u8, b: *u8) -> i64 called by 1: main |
| 39 | func mps_serve(cfd: i64, fpath: *u8, ctype: *u8) -> i64 |
| 56 | func main() -> i64 |