Skip to content

Instantly share code, notes, and snippets.

@bioduds
Created June 11, 2017 02:20
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 bioduds/7d3d3f7e91e36b506f9e6e6254110929 to your computer and use it in GitHub Desktop.
Save bioduds/7d3d3f7e91e36b506f9e6e6254110929 to your computer and use it in GitHub Desktop.
this is responsive, I mean it responds to a signal dying
my $socket = IO::Socket::Async.listen('192.168.1.106', 5000);
react {
whenever $socket.Supply -> $v {
if $v.chars > 0 {
say $v;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment