code wiki / _hdl_build / nx_mp_relay.nx

nx_mp_relay.nx

buildroot/runtime/_hdl_build/nx_mp_relay.nx

2052 B48 linesdepth 1pulls 1 transitivereach 5 importersview sourcekind librarytopic mp
docsdependenciesstructsconstsfunctions

about

nx_mp_relay.nx -- sovereign DAEMON-SIDE player-state relay serializer for multiplayer pixelmon. The daemon receives each player's POSTed snapshot (rr_post over nx_room_relay) and, on a /roster GET, serializes the OTHER live players in that room into ONE response body that the browser hands straight to the wasm (gi_net_ingest_roster parses it). Record format = [len:1 byte][frame bytes], matching the wasm parser exactly. Composes nx_room_relay; pure buffer ops (no syscalls) so it drops into any socket daemon (nx_arcade_serve / vroom). The browser host does only memcpy + one wasm call -- zero net logic in JS. license_tier: ORIGINAL

dependencies 1 imports · 3 importers

nx_room_relay.nx nx_mp_relay.nx nx_mp_daemon.nx nx_mp_relay_gate.nx nx_wasm_mineworld_mp_gate.nx

imports: nx_room_relay.nx

imported by: nx_mp_daemon.nxnx_mp_relay_gate.nxnx_wasm_mineworld_mp_gate.nx

structs

none

consts

none

functions

12func mp_roster_body(st: *i64, arena: *u8, slotb: i64, rm: i64, self_pr: i64, now: i64, ttl: i64, out: *u8) -> i64
36func mp_roster_count(body: *u8, total: i64) -> i64
called by 3: mainmainmain