OpenSDN source code
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
HttpSession::RequestBuilder Class Reference
Collaboration diagram for HttpSession::RequestBuilder:

Public Member Functions

 RequestBuilder ()
 
void Clear ()
 
size_t Parse (const u_int8_t *data, size_t datalen)
 
bool complete () const
 
HttpRequestGetRequest ()
 

Private Member Functions

void PushHeader ()
 

Static Private Member Functions

static int OnMessageBegin (struct http_parser *parser)
 
static int OnHeadersComplete (struct http_parser *parser)
 
static int OnMessageComplete (struct http_parser *parser)
 
static int OnUrl (struct http_parser *parser, const char *loc, size_t length)
 
static int OnStatusComplete (struct http_parser *parser)
 
static int OnHeaderField (struct http_parser *parser, const char *loc, size_t length)
 
static int OnHeaderValue (struct http_parser *parser, const char *loc, size_t length)
 
static int OnBody (struct http_parser *parser, const char *loc, size_t length)
 

Private Attributes

struct http_parser parser_
 
std::unique_ptr< HttpRequestrequest_
 
bool complete_
 
string tmp_url_
 
string header_key_
 
string header_value_
 

Static Private Attributes

static struct http_parser_settings settings_
 

Detailed Description

Definition at line 27 of file http_session.cc.

Constructor & Destructor Documentation

HttpSession::RequestBuilder::RequestBuilder ( )
inline

Definition at line 29 of file http_session.cc.

Member Function Documentation

void HttpSession::RequestBuilder::Clear ( )
inline

Definition at line 34 of file http_session.cc.

bool HttpSession::RequestBuilder::complete ( ) const
inline

Definition at line 48 of file http_session.cc.

HttpRequest* HttpSession::RequestBuilder::GetRequest ( )
inline

Definition at line 51 of file http_session.cc.

static int HttpSession::RequestBuilder::OnBody ( struct http_parser *  parser,
const char *  loc,
size_t  length 
)
inlinestaticprivate

Definition at line 108 of file http_session.cc.

static int HttpSession::RequestBuilder::OnHeaderField ( struct http_parser *  parser,
const char *  loc,
size_t  length 
)
inlinestaticprivate

Definition at line 89 of file http_session.cc.

Here is the call graph for this function:

static int HttpSession::RequestBuilder::OnHeadersComplete ( struct http_parser *  parser)
inlinestaticprivate

Definition at line 61 of file http_session.cc.

Here is the call graph for this function:

static int HttpSession::RequestBuilder::OnHeaderValue ( struct http_parser *  parser,
const char *  loc,
size_t  length 
)
inlinestaticprivate

Definition at line 100 of file http_session.cc.

static int HttpSession::RequestBuilder::OnMessageBegin ( struct http_parser *  parser)
inlinestaticprivate

Definition at line 57 of file http_session.cc.

static int HttpSession::RequestBuilder::OnMessageComplete ( struct http_parser *  parser)
inlinestaticprivate

Definition at line 70 of file http_session.cc.

static int HttpSession::RequestBuilder::OnStatusComplete ( struct http_parser *  parser)
inlinestaticprivate

Definition at line 85 of file http_session.cc.

static int HttpSession::RequestBuilder::OnUrl ( struct http_parser *  parser,
const char *  loc,
size_t  length 
)
inlinestaticprivate

Definition at line 77 of file http_session.cc.

size_t HttpSession::RequestBuilder::Parse ( const u_int8_t *  data,
size_t  datalen 
)
inline

Definition at line 41 of file http_session.cc.

void HttpSession::RequestBuilder::PushHeader ( )
inlineprivate

Definition at line 116 of file http_session.cc.

Member Data Documentation

bool HttpSession::RequestBuilder::complete_
private

Definition at line 127 of file http_session.cc.

string HttpSession::RequestBuilder::header_key_
private

Definition at line 129 of file http_session.cc.

string HttpSession::RequestBuilder::header_value_
private

Definition at line 130 of file http_session.cc.

struct http_parser HttpSession::RequestBuilder::parser_
private

Definition at line 124 of file http_session.cc.

std::unique_ptr<HttpRequest> HttpSession::RequestBuilder::request_
private

Definition at line 125 of file http_session.cc.

struct http_parser_settings HttpSession::RequestBuilder::settings_
staticprivate

Definition at line 122 of file http_session.cc.

string HttpSession::RequestBuilder::tmp_url_
private

Definition at line 128 of file http_session.cc.


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