22 lines
391 B
Plaintext
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
|
|
}
|
|
}) |