Ivan Ratnikov > HTTP-Server-EV-0.41 > HTTP::Server::EV::Buffer

Download:
HTTP-Server-EV-0.41.tar.gz

Dependencies

Annotate this POD

CPAN RT

New  1
Open  1
View/Report Bugs
Module Version: 0.41   Source   Latest Release: HTTP-Server-EV-0.68

NAME ^

HTTP::Server::EV::Buffer - Non-blocking output buffer.

GLOBAL PARAMETERS ^

$HTTP::Server::EV::Buffer::autoflush = 1024*50; # Default buffered data size in bytes when buffer starts waiting socket to be writable to send data. Setting 0 disables buffering, data will be sent as soon as socket becomes writable.

METHODS ^

new({ fh => $sock_handle , flush => autoflush_threshold(optional), onerror => sub { onerror(disconect) optional callback} ondisconnect });

Creates new HTTP::Server::EV::Buffer object.

$buffer->print(@args);

Prints data to buffer.

$buffer->flush( $flush_threshold(optional) );

Sends all buffered data to socket and sets new flush threshold if $flush_threshold defined;

TODO ^

Implement onerror callback

syntax highlighting: