… | |
… | |
16 | # extension yes, completely stupid, not yet |
16 | # extension yes, completely stupid, not yet |
17 | warn "unable to establish listen sockect, exiting.\n"; |
17 | warn "unable to establish listen sockect, exiting.\n"; |
18 | exit (2); |
18 | exit (2); |
19 | } |
19 | } |
20 | |
20 | |
21 | Event->io (fd => $LISTEN, poll => 'r', cb => sub { |
21 | Event->io (fd => $LISTEN, poll => 'r', data => cf::WF_AUTOCANCEL, cb => sub { |
22 | my ($fh, $peername) = $LISTEN->accept |
22 | my ($fh, $peername) = $LISTEN->accept |
23 | or return; |
23 | or return; |
24 | |
24 | |
25 | my $fd = fileno $fh; |
25 | my $fd = fileno $fh; |
26 | my $host = inet_ntoa +(sockaddr_in $peername)[1]; |
26 | my $host = inet_ntoa +(sockaddr_in $peername)[1]; |