#include <reader.hpp>
Inherits pion::http::parser.
Inherited by pion::http::request_reader, and pion::http::response_reader.
Public Member Functions | |
void | receive (void) |
Incrementally reads & parses the HTTP message. | |
tcp::connection_ptr & | get_connection (void) |
returns a shared pointer to the TCP connection | |
void | set_timeout (boost::uint32_t seconds) |
sets the maximum number of seconds for read operations | |
Protected Member Functions | |
reader (const bool is_request, tcp::connection_ptr &tcp_conn) | |
void | consume_bytes (const boost::system::error_code &read_error, std::size_t bytes_read) |
void | consume_bytes (void) |
Consumes bytes that have been read using an HTTP parser. | |
virtual void | read_bytes (void)=0 |
Reads more bytes from the TCP connection. | |
virtual void | finished_reading (const boost::system::error_code &ec)=0 |
Called after we have finished reading/parsing the HTTP message. | |
virtual http::message & | get_message (void)=0 |
Returns a reference to the HTTP message being parsed. |
reader: asynchronously reads and parses HTTP messages
Definition at line 28 of file reader.hpp.
pion::http::reader::reader | ( | const bool | is_request, | |
tcp::connection_ptr & | tcp_conn | |||
) | [inline, protected] |
void pion::http::reader::consume_bytes | ( | const boost::system::error_code & | read_error, | |
std::size_t | bytes_read | |||
) | [protected] |
Consumes bytes that have been read using an HTTP parser
read_error | error status from the last read operation | |
bytes_read | number of bytes consumed by the last read operation |
Definition at line 41 of file http_reader.cpp.
References consume_bytes(), pion::http::parser::is_parsing_request(), pion::http::parser::m_logger, and pion::http::parser::set_read_buffer().