Some checks failed
Build and Deploy / build-macos (push) Failing after 4s
Build and Deploy / build-windows (CLANG64) (push) Has been cancelled
Build and Deploy / package-dist (push) Has been cancelled
Build and Deploy / deploy-itch (push) Has been cancelled
Build and Deploy / deploy-gitea (push) Has been cancelled
Build and Deploy / build-linux (push) Has been cancelled
36 lines
598 B
JavaScript
36 lines
598 B
JavaScript
// Test to connect to a portal
|
|
|
|
function contact_fn(actor,reason) {
|
|
if (actor) {
|
|
console.log(`Got an actor: ${json.encode(actor)}`)
|
|
|
|
send(actor, {greet: "Hello!"}, e => {
|
|
console.log(`Got the response ${json.encode(e)}. Goodbye!`);
|
|
$_.stop()
|
|
})
|
|
}
|
|
else
|
|
console.log(`Did not get an actor: ${json.encode(reason)}`)
|
|
}
|
|
|
|
$_.contact(contact_fn,
|
|
{
|
|
address: "localhost",
|
|
port: 5678,
|
|
password: "abc123"
|
|
});
|
|
|
|
/*$_.contact(contact_fn, {
|
|
address: "localhost",
|
|
port: 5678,
|
|
password: "123abc"
|
|
})
|
|
|
|
$_.contact(contact_fn, {
|
|
address: "localhost",
|
|
port:1111,
|
|
})
|
|
|
|
|
|
*/
|