#include <request_reader.hpp>
Inherits pion::http::reader.
Public Types | |
typedef boost::function3< void, http::request_ptr, tcp::connection_ptr, const boost::system::error_code & > | finished_handler_t |
function called after the HTTP message has been parsed | |
Public Member Functions | |
void | set_headers_parsed_callback (finished_handler_t &h) |
sets a function to be called after HTTP headers have been parsed | |
Static Public Member Functions | |
static boost::shared_ptr < request_reader > | create (tcp::connection_ptr &tcp_conn, finished_handler_t handler) |
Protected Member Functions | |
request_reader (tcp::connection_ptr &tcp_conn, finished_handler_t handler) | |
virtual void | read_bytes (void) |
Reads more bytes from the TCP connection. | |
virtual void | finished_parsing_headers (const boost::system::error_code &ec) |
Called after we have finished parsing the HTTP message headers. | |
virtual void | finished_reading (const boost::system::error_code &ec) |
Called after we have finished reading/parsing the HTTP message. | |
virtual http::message & | get_message (void) |
Returns a reference to the HTTP message being parsed. | |
Protected Attributes | |
http::request_ptr | m_http_msg |
The new HTTP message container being created. | |
finished_handler_t | m_finished |
function called after the HTTP message has been parsed | |
finished_handler_t | m_parsed_headers |
function called after the HTTP message headers have been parsed |
request_reader: asynchronously reads and parses HTTP requests
Definition at line 31 of file request_reader.hpp.
pion::http::request_reader::request_reader | ( | tcp::connection_ptr & | tcp_conn, | |
finished_handler_t | handler | |||
) | [inline, protected] |
protected constructor restricts creation of objects (use create())
tcp_conn | TCP connection containing a new message to parse | |
handler | function called after the message has been parsed |
Definition at line 71 of file request_reader.hpp.
References m_http_msg, and pion::http::parser::set_logger().
Referenced by create().
static boost::shared_ptr<request_reader> pion::http::request_reader::create | ( | tcp::connection_ptr & | tcp_conn, | |
finished_handler_t | handler | |||
) | [inline, static] |
creates new request_reader objects
tcp_conn | TCP connection containing a new message to parse | |
handler | function called after the message has been parsed |
Definition at line 53 of file request_reader.hpp.
References request_reader().
Referenced by pion::http::server::handle_connection().