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.244 by root, Wed Apr 1 19:59:01 2015 UTC vs.
Revision 1.245 by root, Tue Jun 16 03:22:20 2015 UTC

91 91
92=item fh => $filehandle [C<fh> or C<connect> MANDATORY] 92=item fh => $filehandle [C<fh> or C<connect> MANDATORY]
93 93
94The filehandle this L<AnyEvent::Handle> object will operate on. 94The filehandle this L<AnyEvent::Handle> object will operate on.
95NOTE: The filehandle will be set to non-blocking mode (using 95NOTE: The filehandle will be set to non-blocking mode (using
96C<AnyEvent::Util::fh_nonblocking>) by the constructor and needs to stay in 96C<AnyEvent::fh_unblock>) by the constructor and needs to stay in
97that mode. 97that mode.
98 98
99=item connect => [$host, $service] [C<fh> or C<connect> MANDATORY] 99=item connect => [$host, $service] [C<fh> or C<connect> MANDATORY]
100 100
101Try to connect to the specified host and service (port), using 101Try to connect to the specified host and service (port), using
611 # with AnyEvent::Handle, do them a favour. 611 # with AnyEvent::Handle, do them a favour.
612 my $type = getsockopt $self->{fh}, Socket::SOL_SOCKET (), Socket::SO_TYPE (); 612 my $type = getsockopt $self->{fh}, Socket::SOL_SOCKET (), Socket::SO_TYPE ();
613 Carp::croak "AnyEvent::Handle: only stream sockets supported, anything else will NOT work!" 613 Carp::croak "AnyEvent::Handle: only stream sockets supported, anything else will NOT work!"
614 if Socket::SOCK_STREAM () != (unpack "I", $type) && defined $type; 614 if Socket::SOCK_STREAM () != (unpack "I", $type) && defined $type;
615 615
616 AnyEvent::Util::fh_nonblocking $self->{fh}, 1; 616 AnyEvent::fh_unblock $self->{fh};
617 617
618 $self->{_activity} = 618 $self->{_activity} =
619 $self->{_ractivity} = 619 $self->{_ractivity} =
620 $self->{_wactivity} = AE::now; 620 $self->{_wactivity} = AE::now;
621 621

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines