1POE::Filter::RecordBlocUks(e3r)Contributed Perl DocumentPaOtEi:o:nFilter::RecordBlock(3)
2
3
4

NAME

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

SYNOPSIS

9         $filter = new POE::Filter::RecordBlock( BlockSize => 4 );
10         $arrayref_of_arrayrefs = $filter->get($arrayref_of_raw_data);
11         $arrayref_of_raw_chunks = $filter->put($arrayref_of_arrayrefs);
12         $arrayref_of_raw_chunks = $filter->put($single_arrayref);
13         $arrayref_of_leftovers = $filter->get_pending;
14         $arrayref_of_leftovers = $filter->put_pending;
15

DESCRIPTION

17       RecordBlock translates between streams of records and blocks of
18       records.  In other words, it combines a number of received records into
19       frames (array references), and it breaks frames back into streams of
20       records in preparation for transmitting.
21
22       A BlockSize parameter must be specified when the filter is constructed.
23       It determines how many records are framed into a block, and it can be
24       changed at runtime.  Checking put() for proper block sizes is optional
25       and can be either passed as a parameter to the new() method or changed
26       at runtime.
27
28       Extra records are held until enough records arrive to complete a block.
29

PUBLIC FILTER METHODS

31       new POE::Filter::RecordBlock::new
32
33           The new() method takes at least one mandatory argument, the Block‐
34           Size parameter.  It must be defined and greater than zero.  The
35           CheckPut parameter is optional, but if it contains a true value,
36           "put" blocksize checking is turned on.  Note that if this is the
37           case, flushing pending records to be put is your responsibility
38           (see put_pending()).
39
40       put_pending
41           POE::Filter::RecordBlock::put_pending
42
43           The put_pending() method returns an arrayref of any records that
44           are waiting to be sent.
45
46       blocksize
47           POE::Filter::RecordBlock::blocksize
48
49           The blocksize() method takes one optional parameter, the new block‐
50           size.  It returns the current blocksize.
51
52       checkput
53           POE::Filter::RecordBlock::checkput
54
55           The checkput() method takes one optional parameter, the new state
56           of the CheckPut flag.  It returns the current CheckPut flag.
57
58       *   See POE::Filter.
59

SEE ALSO

61       POE::Filter; POE::Filter::Stackable; POE::Filter::HTTPD; POE::Fil‐
62       ter::Reference; POE::Filter::Line; POE::Filter::Block; POE::Fil‐
63       ter::Stream
64

BUGS

66       Undoubtedly.
67

AUTHORS & COPYRIGHTS

69       The RecordBlock filter was contributed by Dieter Pearcey.  Rocco Caputo
70       is sure to have had his hands in it.
71
72       Please see the POE manpage for more information about authors and con‐
73       tributors.
74
75
76
77perl v5.8.8                       2006-09-01       POE::Filter::RecordBlock(3)
Impressum