Sirikata
|
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 |
Sirikata::Command::HttpRequest::HttpRequest | ( | HttpRequestID | _id, |
TCPSocketPtr | s | ||
) | [inline] |
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] |
References headers, mLastCallback, mTempHeaderField, mTempHeaderValue, and NONE.
Referenced by HttpRequest().
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] |
References headers, mLastCallback, mTempHeaderField, and mTempHeaderValue.
Referenced by HttpRequest().
int Sirikata::Command::HttpRequest::on_message_complete | ( | http_parser * | _ | ) | [static] |
References body, Sirikata::Logging::detailed, fragment, headers, HTTP_LOG, Sirikata::Logging::insane, path, queryString, setFinished(), and url.
Referenced by HttpRequest().
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().
Referenced by on_body(), and on_message_complete().
Referenced by on_fragment(), and on_message_complete().
Referenced by on_header_field(), on_headers_complete(), and on_message_complete().
http_parser Sirikata::Command::HttpRequest::mHttpParser [protected] |
http_parser_settings Sirikata::Command::HttpRequest::mHttpSettings [protected] |
Referenced by on_header_field(), on_header_value(), and on_headers_complete().
std::string Sirikata::Command::HttpRequest::mTempHeaderField [protected] |
Referenced by on_header_field(), and on_headers_complete().
std::string Sirikata::Command::HttpRequest::mTempHeaderValue [protected] |
Referenced by on_header_field(), on_header_value(), and on_headers_complete().
Referenced by on_message_complete(), and on_path().
Referenced by on_message_complete(), and on_query_string().
Referenced by on_message_complete(), and on_url().