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.228 by root, Mon Feb 6 00:17:26 2012 UTC vs.
Revision 1.229 by root, Mon Feb 27 17:14:02 2012 UTC

230If an EOF condition has been detected but no C<on_eof> callback has been 230If an EOF condition has been detected but no C<on_eof> callback has been
231set, then a fatal error will be raised with C<$!> set to <0>. 231set, then a fatal error will be raised with C<$!> set to <0>.
232 232
233=item on_drain => $cb->($handle) 233=item on_drain => $cb->($handle)
234 234
235This sets the callback that is called when the write buffer becomes empty 235This sets the callback that is called once when the write buffer becomes
236(or immediately if the buffer is empty already). 236empty (and immediately when the handle object is created).
237 237
238To append to the write buffer, use the C<< ->push_write >> method. 238To append to the write buffer, use the C<< ->push_write >> method.
239 239
240This callback is useful when you don't want to put all of your write data 240This callback is useful when you don't want to put all of your write data
241into the queue at once, for example, when you want to write the contents 241into the queue at once, for example, when you want to write the contents
886 886
887The write queue is very simple: you can add data to its end, and 887The write queue is very simple: you can add data to its end, and
888AnyEvent::Handle will automatically try to get rid of it for you. 888AnyEvent::Handle will automatically try to get rid of it for you.
889 889
890When data could be written and the write buffer is shorter then the low 890When data could be written and the write buffer is shorter then the low
891water mark, the C<on_drain> callback will be invoked. 891water mark, the C<on_drain> callback will be invoked once.
892 892
893=over 4 893=over 4
894 894
895=item $handle->on_drain ($cb) 895=item $handle->on_drain ($cb)
896 896

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines