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.200 by root, Tue Oct 12 06:47:54 2010 UTC vs.
Revision 1.202 by root, Sat Oct 16 02:01:54 2010 UTC

764 $_[0]{$on_timeout} = $_[1]; 764 $_[0]{$on_timeout} = $_[1];
765 }; 765 };
766 766
767 *$timeout = sub { 767 *$timeout = sub {
768 my ($self, $new_value) = @_; 768 my ($self, $new_value) = @_;
769
770 $new_value >= 0
771 or Carp::croak "AnyEvent::Handle->$timeout called with negative timeout ($new_value), caught";
769 772
770 $self->{$timeout} = $new_value; 773 $self->{$timeout} = $new_value;
771 delete $self->{$tw}; &$cb; 774 delete $self->{$tw}; &$cb;
772 }; 775 };
773 776
2003 push @linger, AE::io $fh, 1, sub { 2006 push @linger, AE::io $fh, 1, sub {
2004 my $len = syswrite $fh, $wbuf, length $wbuf; 2007 my $len = syswrite $fh, $wbuf, length $wbuf;
2005 2008
2006 if ($len > 0) { 2009 if ($len > 0) {
2007 substr $wbuf, 0, $len, ""; 2010 substr $wbuf, 0, $len, "";
2008 } else { 2011 } elsif (defined $len || ($! != EAGAIN && $! != EINTR && $! != WSAEWOULDBLOCK)) {
2009 @linger = (); # end 2012 @linger = (); # end
2010 } 2013 }
2011 }; 2014 };
2012 push @linger, AE::timer $linger, 0, sub { 2015 push @linger, AE::timer $linger, 0, sub {
2013 @linger = (); 2016 @linger = ();

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines