#include <HTTPResponseReader.hpp>
Inherits pion::net::HTTPReader.
Definition at line 31 of file HTTPResponseReader.hpp.
Public Types | |
typedef boost::function2< void, HTTPResponsePtr, TCPConnectionPtr > | FinishedHandler |
function called after the HTTP message has been parsed | |
Public Member Functions | |
virtual | ~HTTPResponseReader () |
Static Public Member Functions | |
static boost::shared_ptr< HTTPResponseReader > | create (TCPConnectionPtr &tcp_conn, const HTTPRequest &http_request, FinishedHandler handler) |
Protected Member Functions | |
HTTPResponseReader (TCPConnectionPtr &tcp_conn, const HTTPRequest &http_request, FinishedHandler handler) | |
virtual void | readBytes (void) |
Reads more bytes from the TCP connection. | |
virtual void | finishedReading (void) |
Called after we have finished reading/parsing the HTTP message. | |
virtual HTTPMessage & | getMessage (void) |
Returns a reference to the HTTP message being parsed. | |
Protected Attributes | |
HTTPResponsePtr | m_http_msg |
The new HTTP message container being created. | |
FinishedHandler | m_finished |
function called after the HTTP message has been parsed |
pion::net::HTTPResponseReader::HTTPResponseReader | ( | TCPConnectionPtr & | tcp_conn, | |
const HTTPRequest & | http_request, | |||
FinishedHandler | handler | |||
) | [inline, protected] |
protected constructor restricts creation of objects (use create())
tcp_conn | TCP connection containing a new message to parse | |
http_request | the request we are responding to | |
handler | function called after the message has been parsed |
Definition at line 70 of file HTTPResponseReader.hpp.
References m_http_msg, and pion::net::HTTPParser::setLogger().
Referenced by create().
static boost::shared_ptr<HTTPResponseReader> pion::net::HTTPResponseReader::create | ( | TCPConnectionPtr & | tcp_conn, | |
const HTTPRequest & | http_request, | |||
FinishedHandler | handler | |||
) | [inline, static] |
creates new HTTPResponseReader objects
tcp_conn | TCP connection containing a new message to parse | |
http_request | the request we are responding to | |
handler | function called after the message has been parsed |
Definition at line 53 of file HTTPResponseReader.hpp.
References HTTPResponseReader().