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

Comparing AnyEvent/lib/AnyEvent/Handle.pm (file contents):
Revision 1.194 by root, Thu May 20 21:22:21 2010 UTC vs.
Revision 1.195 by root, Sat Jun 5 09:08:14 2010 UTC

534sub _start { 534sub _start {
535 my ($self) = @_; 535 my ($self) = @_;
536 536
537 # too many clueless people try to use udp and similar sockets 537 # too many clueless people try to use udp and similar sockets
538 # with AnyEvent::Handle, do them a favour. 538 # with AnyEvent::Handle, do them a favour.
539 if (Socket::SOCK_STREAM != unpack "I", getsockopt $self->{fh}, Socket::SOL_SOCKET (), Socket::SO_TYPE ()) { 539 my $type = getsockopt $self->{fh}, Socket::SOL_SOCKET (), Socket::SO_TYPE ();
540 Carp::croak "AnyEvent::Handle: only stream sockets supported, anything else will NOT work!"; 540 Carp::croak "AnyEvent::Handle: only stream sockets supported, anything else will NOT work!"
541 } 541 if Socket::SOCK_STREAM != (unpack "I", $type) && defined $type;
542 542
543 AnyEvent::Util::fh_nonblocking $self->{fh}, 1; 543 AnyEvent::Util::fh_nonblocking $self->{fh}, 1;
544 544
545 $self->{_activity} = 545 $self->{_activity} =
546 $self->{_ractivity} = 546 $self->{_ractivity} =

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines