The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

POE::Filter::Block - POE Block Protocol Abstraction

SYNOPSIS

  $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();

DESCRIPTION

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.

PUBLIC FILTER METHODS

Please see POE::Filter.

SEE ALSO

POE::Filter; POE::Filter::HTTPD; POE::Filter::Reference; POE::Filter::Stream; POE::Filter::Line

BUGS

None known.

AUTHORS & COPYRIGHTS

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.