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.230 by root, Tue Mar 27 16:21:11 2012 UTC vs.
Revision 1.231 by root, Tue Mar 27 23:47:57 2012 UTC

11 11
12 my $hdl; $hdl = new AnyEvent::Handle 12 my $hdl; $hdl = new AnyEvent::Handle
13 fh => \*STDIN, 13 fh => \*STDIN,
14 on_error => sub { 14 on_error => sub {
15 my ($hdl, $fatal, $msg) = @_; 15 my ($hdl, $fatal, $msg) = @_;
16 AE::log error => "got error $msg\n"; 16 AE::log error => "Got error $msg!";
17 $hdl->destroy; 17 $hdl->destroy;
18 $cv->send; 18 $cv->send;
19 }; 19 };
20 20
21 # send some request line 21 # send some request line
2336C<low_water_mark> this will be called precisely when all data has been 2336C<low_water_mark> this will be called precisely when all data has been
2337written to the socket: 2337written to the socket:
2338 2338
2339 $handle->push_write (...); 2339 $handle->push_write (...);
2340 $handle->on_drain (sub { 2340 $handle->on_drain (sub {
2341 AE::log debug => "all data submitted to the kernel\n"; 2341 AE::log debug => "All data submitted to the kernel.";
2342 undef $handle; 2342 undef $handle;
2343 }); 2343 });
2344 2344
2345If you just want to queue some data and then signal EOF to the other side, 2345If you just want to queue some data and then signal EOF to the other side,
2346consider using C<< ->push_shutdown >> instead. 2346consider using C<< ->push_shutdown >> instead.

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines