Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- my $socket = IO::Socket::INET.new:
- localhost => 'localhost',
- localport => 12321,
- listen => 10,
- blocking => 0;
- while $socket.accept -> $conn {
- say "Accepted connection";
- do {
- while $conn.recv -> $stuff {
- say "Echoing $stuff";
- $conn.send($stuff);
- }
- $conn.close;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement