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.32 by root, Sun May 25 01:10:54 2008 UTC vs.
Revision 1.33 by root, Sun May 25 03:03:51 2008 UTC

2 2
3no warnings; 3no warnings;
4use strict; 4use strict;
5 5
6use AnyEvent (); 6use AnyEvent ();
7use AnyEvent::Util qw(WSAEAGAIN); 7use AnyEvent::Util qw(WSAWOULDBLOCK);
8use Scalar::Util (); 8use Scalar::Util ();
9use Carp (); 9use Carp ();
10use Fcntl (); 10use Fcntl ();
11use Errno qw/EAGAIN EINTR/; 11use Errno qw/EAGAIN EINTR/;
12 12
301 $self->{on_drain}($self) 301 $self->{on_drain}($self)
302 if $self->{low_water_mark} >= length $self->{wbuf} 302 if $self->{low_water_mark} >= length $self->{wbuf}
303 && $self->{on_drain}; 303 && $self->{on_drain};
304 304
305 delete $self->{ww} unless length $self->{wbuf}; 305 delete $self->{ww} unless length $self->{wbuf};
306 } elsif ($! != EAGAIN && $! != EINTR && $! != WSAEAGAIN) { 306 } elsif ($! != EAGAIN && $! != EINTR && $! != WSAWOULDBLOCK) {
307 $self->error; 307 $self->error;
308 } 308 }
309 }; 309 };
310 310
311 $self->{ww} = AnyEvent->io (fh => $self->{fh}, poll => "w", cb => $cb); 311 $self->{ww} = AnyEvent->io (fh => $self->{fh}, poll => "w", cb => $cb);
787 } elsif (defined $len) { 787 } elsif (defined $len) {
788 delete $self->{rw}; 788 delete $self->{rw};
789 $self->{eof} = 1; 789 $self->{eof} = 1;
790 $self->_drain_rbuf; 790 $self->_drain_rbuf;
791 791
792 } elsif ($! != EAGAIN && $! != EINTR && $! != &AnyEvent::Util::WSAEAGAIN) { 792 } elsif ($! != EAGAIN && $! != EINTR && $! != &AnyEvent::Util::WSAWOULDBLOCK) {
793 return $self->error; 793 return $self->error;
794 } 794 }
795 }); 795 });
796 } 796 }
797} 797}

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines