Files
cell/examples/nat_client.ce
2025-12-18 18:43:23 -06:00

22 lines
391 B
Plaintext

log.console(`nat client starting`)
$contact((actor, reason) => {
if (actor) {
log.console(`trying to message ${actor}`)
send(actor, {type:"greet"})
} else {
log.console(reason)
}
}, {
address: "108.210.60.32", // NAT server's public IP
port: 4000,
actor: $self
})
$receiver(e => {
switch(e.type) {
case 'greet':
log.console(`hello!`)
break
}
})