Skip to content

Instantly share code, notes, and snippets.

@MasterDuke17
Created March 2, 2018 01:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MasterDuke17/9b8fb21de6179a15795378be31d3a311 to your computer and use it in GitHub Desktop.
Save MasterDuke17/9b8fb21de6179a15795378be31d3a311 to your computer and use it in GitHub Desktop.
await IO::Socket::Async.connect('foobar', 3333).then( -> $p {
if $p.status {
given $p.result {
.print('Hello, Perl 6');
react {
whenever .Supply() -> $v {
$v.say;
done;
}
}
.close;
}
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment