ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/AnyEvent/lib/AnyEvent/Socket.pm
(Generate patch)

Comparing AnyEvent/lib/AnyEvent/Socket.pm (file contents):
Revision 1.114 by root, Fri Aug 21 11:59:25 2009 UTC vs.
Revision 1.115 by root, Tue Sep 29 09:40:36 2009 UTC

1016 listen $state{fh}, $len 1016 listen $state{fh}, $len
1017 or Carp::croak "listen: $!"; 1017 or Carp::croak "listen: $!";
1018 1018
1019 $state{aw} = AE::io $state{fh}, 0, sub { 1019 $state{aw} = AE::io $state{fh}, 0, sub {
1020 # this closure keeps $state alive 1020 # this closure keeps $state alive
1021 while (my $peer = accept my $fh, $state{fh}) { 1021 while ($state{fh} && (my $peer = accept my $fh, $state{fh})) {
1022 fh_nonblocking $fh, 1; # POSIX requires inheritance, the outside world does not 1022 fh_nonblocking $fh, 1; # POSIX requires inheritance, the outside world does not
1023 1023
1024 my ($service, $host) = unpack_sockaddr $peer; 1024 my ($service, $host) = unpack_sockaddr $peer;
1025 $accept->($fh, format_address $host, $service); 1025 $accept->($fh, format_address $host, $service);
1026 } 1026 }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines