# pion::net::HTTPRequestReader Class Reference

`#include <HTTPRequestReader.hpp>`

Inherits pion::net::HTTPReader.

List of all members.

## Detailed Description

HTTPRequestReader: asynchronously reads and parses HTTP requests

Definition at line 31 of file HTTPRequestReader.hpp.

## Public Types

typedef boost::function3< void, HTTPRequestPtr, TCPConnectionPtr, const boost::system::error_code & > | FinishedHandler
| function called after the HTTP message has been parsed

## Public Member Functions

virtual | ~HTTPRequestReader ()

## Static Public Member Functions

static boost::shared_ptr< HTTPRequestReader > | create (TCPConnectionPtr &tcp_conn, FinishedHandler handler)

## Protected Member Functions

| HTTPRequestReader (TCPConnectionPtr &tcp_conn, FinishedHandler handler)
virtual void | readBytes (void)
| Reads more bytes from the TCP connection.
virtual void | finishedReading (const boost::system::error_code &ec)
| 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

HTTPRequestPtr | m_http_msg
| The new HTTP message container being created.
FinishedHandler | m_finished
| function called after the HTTP message has been parsed

## Constructor & Destructor Documentation

pion::net::HTTPRequestReader::HTTPRequestReader | ( | TCPConnectionPtr & | tcp_conn,
|  | FinishedHandler | handler |
| ) |  |  | `[inline, protected]`

protected constructor restricts creation of objects (use create())

Parameters:

  | tcp_conn | TCP connection containing a new message to parse
  | handler | function called after the message has been parsed

Definition at line 68 of file HTTPRequestReader.hpp.

References m_http_msg, and pion::net::HTTPParser::setLogger().

Referenced by create().

## Member Function Documentation

static boost::shared_ptr<HTTPRequestReader> pion::net::HTTPRequestReader::create | ( | TCPConnectionPtr & | tcp_conn,
|  | FinishedHandler | handler |
| ) |  |  | `[inline, static]`

creates new HTTPRequestReader objects

Parameters:

  | 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 HTTPRequestReader.hpp.

References HTTPRequestReader().

Referenced by pion::net::HTTPServer::handleConnection().

The documentation for this class was generated from the following file:

- net/include/pion/net/HTTPRequestReader.hpp