Sirikata
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Protected Attributes
Sirikata::Command::HttpRequest Class Reference
Collaboration diagram for Sirikata::Command::HttpRequest:

List of all members.

Public Types

enum  LAST_HEADER_CB { NONE, FIELD, VALUE }
enum  PARSING_STATE { PARSING, FINISHED_PARSING, FAILED }

Public Member Functions

 HttpRequest (HttpRequestID _id, TCPSocketPtr s)
void data (std::size_t nbytes)
void setFinished ()

Static Public Member Functions

static int on_path (http_parser *_, const char *at, size_t len)
static int on_query_string (http_parser *_, const char *at, size_t len)
static int on_url (http_parser *_, const char *at, size_t len)
static int on_fragment (http_parser *_, const char *at, size_t len)
static int on_header_field (http_parser *_, const char *at, size_t len)
static int on_header_value (http_parser *_, const char *at, size_t len)
static int on_headers_complete (http_parser *_)
static int on_body (http_parser *_, const char *at, size_t len)
static int on_message_complete (http_parser *_)

Public Attributes

HttpRequestID id
TCPSocketPtr socket
PARSING_STATE state
String buffer
String path
String queryString
String url
String fragment
Headers headers
String body
String response

Protected Attributes

http_parser_settings mHttpSettings
http_parser mHttpParser
std::string mTempHeaderField
std::string mTempHeaderValue
LAST_HEADER_CB mLastCallback

Member Enumeration Documentation

Enumerator:
NONE 
FIELD 
VALUE 
Enumerator:
PARSING 
FINISHED_PARSING 
FAILED 

Constructor & Destructor Documentation

Sirikata::Command::HttpRequest::HttpRequest ( HttpRequestID  _id,
TCPSocketPtr  s 
) [inline]

Member Function Documentation

void Sirikata::Command::HttpRequest::data ( std::size_t  nbytes) [inline]
int Sirikata::Command::HttpRequest::on_body ( http_parser *  _,
const char *  at,
size_t  len 
) [static]

References body.

Referenced by HttpRequest().

int Sirikata::Command::HttpRequest::on_fragment ( http_parser *  _,
const char *  at,
size_t  len 
) [static]

References fragment.

Referenced by HttpRequest().

int Sirikata::Command::HttpRequest::on_header_field ( http_parser *  _,
const char *  at,
size_t  len 
) [static]
int Sirikata::Command::HttpRequest::on_header_value ( http_parser *  _,
const char *  at,
size_t  len 
) [static]

References mLastCallback, mTempHeaderValue, and NONE.

Referenced by HttpRequest().

int Sirikata::Command::HttpRequest::on_headers_complete ( http_parser *  _) [static]
int Sirikata::Command::HttpRequest::on_message_complete ( http_parser *  _) [static]
int Sirikata::Command::HttpRequest::on_path ( http_parser *  _,
const char *  at,
size_t  len 
) [static]

References path.

Referenced by HttpRequest().

int Sirikata::Command::HttpRequest::on_query_string ( http_parser *  _,
const char *  at,
size_t  len 
) [static]

References queryString.

Referenced by HttpRequest().

int Sirikata::Command::HttpRequest::on_url ( http_parser *  _,
const char *  at,
size_t  len 
) [static]

References url.

Referenced by HttpRequest().

void Sirikata::Command::HttpRequest::setFinished ( ) [inline]

Referenced by on_message_complete().


Member Data Documentation

Referenced by on_body(), and on_message_complete().

Referenced by on_fragment(), and on_message_complete().

http_parser_settings Sirikata::Command::HttpRequest::mHttpSettings [protected]

Referenced by on_message_complete(), and on_path().

Referenced by on_message_complete(), and on_url().


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