Files
cell/tests/contact.cm

23 lines
542 B
Plaintext

return {
test_contact: function() {
function contact_fn(actor,reason) {
if (actor) {
log.console(`Got an actor: ${actor}`)
send(actor, {greet: "Hello!"}, e => {
log.console(`Got the response ${e}. Goodbye!`);
})
}
else
log.console(`Did not get an actor: ${reason}`)
}
$_.contact(contact_fn,
{
address: "localhost",
port: 5678,
password: "abc123"
});
}
}