POE::Filter::Block - POE Block Protocol Abstraction
$filter = new POE::Filter::Block( BlockSize => 1024 ); $arrayref_of_blocks = $filter->get($arrayref_of_raw_chunks_from_driver); $arrayref_of_streamable_chunks_for_driver = $filter->put($arrayref_of_blocks); $arrayref_of_streamable_chunks_for_driver = $filter->put($single_block); $arrayref_of_leftovers = $filter->get_pending();
The Block filter translates streams to and from blocks of bytes. If a block size is specified when the filter is constructed, then fixed-length blocks of that size will be built or parsed. Otherwise it builds and parses length-prepended variable-sized blocks. Programs that specify block sizes less than 1 byte are soundly spanked, just as they deserve.
Extra bytes are buffered until more bytes arrive to complete a block.
Please see POE::Filter.
POE::Filter; POE::Filter::HTTPD; POE::Filter::Reference; POE::Filter::Stream; POE::Filter::Line
None known.
The Block filter was contributed by Dieter Pearcey, with changes by Rocco Caputo.
Please see the POE manpage for more information about authors and contributors.
To install POE, copy and paste the appropriate command in to your terminal.
cpanm
cpanm POE
CPAN shell
perl -MCPAN -e shell install POE
For more information on module installation, please visit the detailed CPAN module installation guide.