All pastes #567658 Raw Edit

Stuff

public text v1 · immutable
·published 2007-06-15 02:37 UTC
rendered paste body
my $sock = new IO::Socket::INET (
#       LocalHost => 'localhost',
        LocalPort => '7022',
        Proto => 'tcp',
        Listen => 1,
        Reuse => 1
        );
die "Could not create socket: $!\n" unless $sock;
while (my $new_sock = $sock->accept) {

        my $buffer = IO::Async::Buffer->new(    handle=> $new_sock,
                                                on_incomming_data => sub{print 'test'})