Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

poe::filter::httpchunk(3pm) [debian man page]

POE::Filter::HTTPChunk(3pm)				User Contributed Perl Documentation			       POE::Filter::HTTPChunk(3pm)

my $TEXT = qr/[^[:cntrl:]]/o; my $qdtext = qr/[^[:cntrl:]"]/o; #<any TEXT except <">> my $quoted_pair = qr/\[[:ascii:]]/o; my $quoted_string =
qr/"(?:$qdtext|$quoted_pair)"/o; my $separators = "[^()<>@,;:\"/[]?={} 	"; my $notoken = qr/(?:[[:cntrl:]$separators]/o;

       my $chunk_ext_name = $token; my $chunk_ext_val = qr/(?:$token|$quoted_string)/o;

       my $chunk_extension = qr/(?:;$chunk_ext_name(?:$chunk_ext_val)?)/o;

       sub put {
	 die "not implemented yet"; }

NAME
POE::Filter::HTTPChunk - Non-blocking incremental HTTP chunk parser. VERSION
version 0.947 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. ); } 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. CONSTRUCTOR
new "new" takes no parameters and returns a shiny new POE::Filter::HTTPChunk object ready to use. 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_start ARRAYREF 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(); SEE ALSO
POE::Filter, POE. BUGS
None are known at this time. AUTHOR &; COPYRIGHTS POE::Filter::HTTPChunk is... o Copyright 2005-2006 Martijn van Beers o 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. 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 <http://rt.cpan.org/NoAuth/Bugs.html?Dist=POE-Component-Client-HTTP> or mail mailto:bug-POE-Component-Client-HTTP@rt.cpan.org <mailto:bug- POE-Component-Client-HTTP@rt.cpan.org> For questions, try the POE mailing list (poe@perl.org) perl v5.14.2 2012-06-03 POE::Filter::HTTPChunk(3pm)

Check Out this Related Man Page

POE::Component::Connection::Keepalive(3pm)		User Contributed Perl Documentation		POE::Component::Connection::Keepalive(3pm)

NAME
POE::Component::Connection::Keepalive - a wheel wrapper around a kept-alive socket VERSION
version 0.271 SYNOPSIS
See the SYNOPSIS for POE::Component::Client::Keepalive for a complete working example. my $connection = $response->{connection}; $heap->{connection} = $connection; $connection->start( InputEvent => "got_input" ); delete $heap->{connection}; # When done with it. DESCRIPTION
POE::Component::Connection::Keepalive is a helper class for POE::Component::Client::Keepalive. It wraps managed sockets, providing a few extra features. Connection objects free their underlying sockets when they are DESTROYed. This eliminates the need to explicitly free sockets when you are done with them. Connection objects manage POE::Wheel::ReadWrite objects internally, saving a bit of effort. new Creates a new POE::Component::Connection::Keepalive instance. It accepts two parameters: A socket handle (socket) and a reference to a POE::Component::Client::Keepalive object to manage the socket when the connection is destroyed. my $conn = POE::Component::Connection::Keepalive->new( socket => $socket_handle, manager => $poe_component_client_keepalive, ); new() is usually called by a POE::Component::Client::Keepalive object. start Starts a POE::Wheel::ReadWrite object. All parameters except Handle for start() are passed directly to POE::Wheel::ReadWrite's constructor. Handle is provided by the connection object. start() returns a reference to the new POE::Wheel::ReadWrite object, but it is not necessary to save a copy of that wheel. The connection object keeps a copy of the reference internally, so the wheel will persist as long as the connection does. The POE::Wheel::ReadWrite object will be DESTROYed when the connection object is. # Asynchronous connection from Client::Keepalive. sub handle_connection { my $connection_info = $_[ARG0]; $_[HEAP]->{connection} = $connection_info->{connection}; $heap->{connection}->start( InputEvent => "got_input", ErrorEvent => "got_error", ); } # Stop the connection (and the wheel) when an error occurs. sub handle_error { delete $_[HEAP]->{connection}; } wheel Returns a reference to the internal POE::Wheel::ReadWrite object, so that methods may be called upon it. $heap->{connection}->wheel()->pause_input(); close Closes the connection immediately. Calls shutdown_input() and shutdown_output() on the wheel also. SEE ALSO
POE POE::Component::Client::Keepalive POE::Wheel::ReadWrite BUGS
None known. LICENSE
This distribution is copyright 2004-2009 by Rocco Caputo. All rights are reserved. This distribution is free software; you may redistribute it and/or modify it under the same terms as Perl itself. AUTHOR
Rocco Caputo <rcaputo@cpan.org> Special thanks to Rob Bloodgood. perl v5.14.2 2012-05-15 POE::Component::Connection::Keepalive(3pm)
Man Page