OpenSDN source code
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

◆ RequestBuilder()

HttpSession::RequestBuilder::RequestBuilder ( )
inline

Definition at line 29 of file http_session.cc.

Member Function Documentation

◆ Clear()

void HttpSession::RequestBuilder::Clear ( )
inline

Definition at line 34 of file http_session.cc.

◆ complete()

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

Definition at line 48 of file http_session.cc.

◆ GetRequest()

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

Definition at line 51 of file http_session.cc.

◆ OnBody()

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.

◆ OnHeaderField()

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:

◆ OnHeadersComplete()

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:

◆ OnHeaderValue()

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.

◆ OnMessageBegin()

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

Definition at line 57 of file http_session.cc.

◆ OnMessageComplete()

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

Definition at line 70 of file http_session.cc.

◆ OnStatusComplete()

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

Definition at line 85 of file http_session.cc.

◆ OnUrl()

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.

◆ Parse()

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

Definition at line 41 of file http_session.cc.

◆ PushHeader()

void HttpSession::RequestBuilder::PushHeader ( )
inlineprivate

Definition at line 116 of file http_session.cc.

Member Data Documentation

◆ complete_

bool HttpSession::RequestBuilder::complete_
private

Definition at line 127 of file http_session.cc.

◆ header_key_

string HttpSession::RequestBuilder::header_key_
private

Definition at line 129 of file http_session.cc.

◆ header_value_

string HttpSession::RequestBuilder::header_value_
private

Definition at line 130 of file http_session.cc.

◆ parser_

struct http_parser HttpSession::RequestBuilder::parser_
private

Definition at line 116 of file http_session.cc.

◆ request_

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

Definition at line 125 of file http_session.cc.

◆ settings_

struct http_parser_settings HttpSession::RequestBuilder::settings_
staticprivate

Definition at line 116 of file http_session.cc.

◆ tmp_url_

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: