POE::Filter::RecordBlock - POE Record Block Abstraction


NAME

POE::Filter::RecordBlock - POE Record Block Abstraction


SYNOPSIS

  $filter = new POE::Filter::RecordBlock( BlockSize => 4 );
  $arrayref_of_arrayrefs = $filter->get($arrayref_of_raw_data);
  $arrayref_of_raw_chunks = $filter->put($arrayref_of_arrayrefs);
  $arrayref_of_raw_chunks = $filter->put($single_arrayref);
  $arrayref_of_leftovers = $filter->get_pending;
  $arrayref_of_leftovers = $filter->put_pending;


DESCRIPTION

RecordBlock translates between streams of records and blocks of records. In other words, it combines a number of received records into frames (array references), and it breaks frames back into streams of records in preparation for transmitting.

A BlockSize parameter must be specified when the filter is constructed. It determines how many records are framed into a block, and it can be changed at runtime. Checking put() for proper block sizes is optional and can be either passed as a parameter to the new() method or changed at runtime.

Extra records are held until enough records arrive to complete a block.


PUBLIC FILTER METHODS


SEE ALSO

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


BUGS

Undoubtedly.


AUTHORS & COPYRIGHTS

The RecordBlock filter was contributed by Dieter Pearcey. Rocco Caputo is sure to have had his hands in it.

Please see the POE manpage for more information about authors and contributors.

 POE::Filter::RecordBlock - POE Record Block Abstraction