logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

POE::Filter::HTTPChunk - Non-blocking incremental HTTP chunk parser.

Author & Copyrights

       POE::Filter::HTTPChunk is...

       • Copyright 2005-2006 Martijn van Beers

       • Copyright 2006 Rocco Caputo

       All  rights are reserved.  POE::Filter::HTTPChunk is free software; you may redistribute it and/or modify
       it under the same terms as Perl itself.

Bugs

       None are known at this time.

Constructor

new
       "new" takes no parameters and returns a shiny new POE::Filter::HTTPChunk object ready to use.

Contact

       Rocco may be contacted by e-mail via <mailto:rcaputo@cpan.org>, and Martijn may be contacted by email via
       <mailto:martijn@cpan.org>.

       The   preferred   way    to    report    bugs    or    requests    is    through    RT    though.     See
       <http://rt.cpan.org/NoAuth/Bugs.html?Dist=POE-Component-Client-HTTP>                or               mail
       <mailto:bug-POE-Component-Client-HTTP@rt.cpan.org>

       For questions, try the POE mailing list (poe@perl.org)

perl v5.36.0                                       2022-11-19                        POE::Filter::HTTPChunk(3pm)

Description

       This filter parses HTTP chunks from a data stream.  It's used by POE::Component::Client::HTTP to do the
       bulk of the low-level HTTP parsing.

Methods

       POE::Filter::HTTPChunk supports the following methods.  Most of them adhere to the standard POE::Filter
       API.  The documentation for POE::Filter explains the API in more detail.

   get_one_startARRAYREF
       Accept an arrayref containing zero or more raw data chunks.  They are added to the filter's input buffer.
       The filter will attempt to parse that data when get_one() is called.

         $filter_httpchunk->get_one_start(\@stream_data);

   get_one
       Parse a single HTTP chunk from the filter's input buffer.  Data is entered into the buffer by the
       get_one_start() method.  Returns an arrayref containing zero or one parsed HTTP chunk.

         $ret_arrayref = $filter_httpchunk->get_one();

   get_pending
       Returns an arrayref of stream data currently pending parsing.  It's used to seamlessly transfer unparsed
       data between an old and a new filter when a wheel's filter is changed.

         $pending_arrayref = $filter_httpchunk->get_pending();

Name

       POE::Filter::HTTPChunk - Non-blocking incremental HTTP chunk parser.

See Also

       POE::Filter, POE.

Synopsis

         # Not a complete program.
         use POE::Filter::HTTPChunk;
         use POE::Wheel::ReadWrite;
         sub setup_io {
           $_[HEAP]->{io_wheel} = POE::Wheel::ReadWrite->new(
             Filter => POE::Filter::HTTPChunk->new(),
             # See POE::Wheel::ReadWrite for other required parameters.
           );
         }

Version

       version 0.949

See Also