nx_net_chan_test.nx
buildroot/runtime/nx_net_chan_test.nx
about
nx_net_chan_test.nx -- prove typed i64 channel works over TCP
loopback with multi-message exchange.
Server thread: accept connection, recv N messages, verify they
equal 0..N-1, send back doubled value. Client thread: connect,
send 0..N-1, recv N doubled values, verify each == 2*i.
This is the distributed-MIMD building block: nx_net_chan_send /
recv is the same shape as nx_chan_send / recv, so existing
pipeline / pool / DAG code can use net_chan wherever they use
chan, transparently distributing across hosts when run on a
cluster.
dependencies 6 imports · 0 importers
imports: nx_kernel_v2.nxnx_log.nxnx_atom.nxnx_thread.nxnx_socket.nxnx_net_chan.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| 24 | struct NetTestState |
consts
| 21 | const NX_PORT: i64 = 38919 |
| 22 | const N_MSGS: i64 = 100 |
functions
| 29 | func _sleep_ms(ms: i64) -> i64 called by 1: client_main |
| 38 | func client_main(arg: *u8) -> i64 |
| 79 | func main() -> nx_exit |