SNode.C
|
#include <Fields.h>
Public Member Functions | |
Fields (core::socket::stream::SocketContext *socketContext, std::set< std::string > fieldsExpected={}) | |
Fields (Fields &)=delete | |
Fields (Fields &&)=delete | |
Fields & | operator= (Fields &)=delete |
Fields & | operator= (Fields &&)=delete |
void | setFieldsExpected (std::set< std::string > fieldsExpected) |
std::size_t | read () |
web::http::CiStringMap< std::string > && | getHeader () |
bool | isComplete () const |
bool | isError () const |
int | getErrorCode () const |
std::string | getErrorReason () |
Private Member Functions | |
void | splitLine (const std::string &line) |
Private Attributes | |
core::socket::stream::SocketContext * | socketContext |
web::http::CiStringMap< std::string > | fields |
std::set< std::string > | fieldsExpected |
std::string | line |
std::size_t | maxLineLength |
bool | completed = false |
int | errorCode = 0 |
std::string | errorReason |
char | lastButOne = '\0' |
char | last = '\0' |
|
explicit |
Definition at line 60 of file Fields.cpp.
References fieldsExpected, maxLineLength, and socketContext.
Referenced by web::http::Parser::Parser().
|
delete |
|
delete |
int web::http::decoder::Fields::getErrorCode | ( | ) | const |
Definition at line 171 of file Fields.cpp.
References errorCode.
Referenced by web::http::Parser::readHeader(), and web::http::Parser::readTrailer().
std::string web::http::decoder::Fields::getErrorReason | ( | ) |
Definition at line 175 of file Fields.cpp.
References errorReason.
Referenced by web::http::Parser::readHeader(), and web::http::Parser::readTrailer().
web::http::CiStringMap< std::string > && web::http::decoder::Fields::getHeader | ( | ) |
Definition at line 159 of file Fields.cpp.
References fields.
Referenced by web::http::Parser::readHeader(), and web::http::Parser::readTrailer().
bool web::http::decoder::Fields::isComplete | ( | ) | const |
Definition at line 163 of file Fields.cpp.
References completed.
Referenced by web::http::Parser::readHeader(), and web::http::Parser::readTrailer().
bool web::http::decoder::Fields::isError | ( | ) | const |
Definition at line 167 of file Fields.cpp.
References errorCode.
Referenced by web::http::Parser::readHeader(), and web::http::Parser::readTrailer().
std::size_t web::http::decoder::Fields::read | ( | ) |
Definition at line 70 of file Fields.cpp.
References completed, errorCode, errorReason, fields, fieldsExpected, last, lastButOne, line, maxLineLength, core::socket::stream::SocketContext::readFromPeer(), socketContext, and splitLine().
Referenced by web::http::Parser::readHeader(), and web::http::Parser::readTrailer().
void web::http::decoder::Fields::setFieldsExpected | ( | std::set< std::string > | fieldsExpected | ) |
Definition at line 66 of file Fields.cpp.
References fieldsExpected.
Referenced by web::http::Parser::analyzeHeader().
|
private |
Definition at line 131 of file Fields.cpp.
References errorCode, errorReason, fields, fieldsExpected, httputils::str_split(), and httputils::str_trimm().
Referenced by read().
|
private |
Definition at line 93 of file Fields.h.
Referenced by isComplete(), and read().
|
private |
Definition at line 94 of file Fields.h.
Referenced by getErrorCode(), isError(), read(), and splitLine().
|
private |
Definition at line 95 of file Fields.h.
Referenced by getErrorReason(), read(), and splitLine().
|
private |
Definition at line 87 of file Fields.h.
Referenced by getHeader(), read(), and splitLine().
|
private |
Definition at line 88 of file Fields.h.
Referenced by Fields(), read(), setFieldsExpected(), and splitLine().
|
private |
|
private |
|
private |
|
private |
|
private |