nx_rpc_test.nx
buildroot/runtime/nx_rpc_test.nx
about
nx_rpc_test.nx -- end-to-end typed RPC over loopback.
Server registers 2 method handlers:
method 1 (echo): copy request -> response unchanged
method 2 (length): respond with the request length as 8-byte i64
Client makes 3 calls (echo "ping" + echo "hello world" + length
"this is a longer message" -> 24), verifies each response, then
sends shutdown sentinel.
dependencies 7 imports · 0 importers
imports: nx_kernel_v2.nxnx_log.nxnx_atom.nxnx_thread.nxnx_socket.nxnx_net_chan.nxnx_rpc.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| 21 | struct RpcTestState |
consts
| 19 | const NX_PORT: i64 = 38927 |
functions
| 26 | func _sleep_ms(ms: i64) -> i64 called by 1: rpc_client |
| 35 | func handler_echo(req: *u8, req_n: i64, resp: *u8, max_resp: i64) -> i64 |
| 43 | func handler_length(req: *u8, req_n: i64, resp: *u8, max_resp: i64) -> i64 |
| 58 | func rpc_client(arg: *u8) -> i64 |
| 110 | func main() -> nx_exit |