Classes | |
class | clan::HTTPRequestHandler |
HTTP request handler class. More... | |
class | clan::HTTPRequestHandlerProvider |
HTTP request handler provider interface. More... | |
class | clan::HTTPServer |
HTTP server. More... | |
class | clan::HTTPServerConnection |
HTTP server connection. More... | |
Construction | |
clan::HTTPRequestHandler::HTTPRequestHandler () | |
Constructs a null instance. More... | |
clan::HTTPRequestHandler::HTTPRequestHandler (HTTPRequestHandlerProvider *provider) | |
Constructs a HTTPRequestHandler. More... | |
clan::HTTPRequestHandler::~HTTPRequestHandler () | |
Attributes | |
bool | clan::HTTPRequestHandler::is_null () const |
Returns true if this object is invalid. More... | |
void | clan::HTTPRequestHandler::throw_if_null () const |
Throw an exception if this object is invalid. More... | |
HTTPRequestHandlerProvider * | clan::HTTPRequestHandler::get_provider () const |
Get Provider. More... | |
Operations | |
bool | clan::HTTPRequestHandler::is_handling_request (const std::string &type, const std::string &url, const std::string &headers) |
void | clan::HTTPRequestHandler::handle_request (HTTPServerConnection &connection) |
Handle request. More... | |
Construction | |
virtual | clan::HTTPRequestHandlerProvider::~HTTPRequestHandlerProvider () |
Operations | |
virtual bool | clan::HTTPRequestHandlerProvider::is_handling_request (const std::string &type, const std::string &url, const std::string &headers)=0 |
virtual void | clan::HTTPRequestHandlerProvider::handle_request (HTTPServerConnection &connection)=0 |
Handle request. More... | |
Construction | |
clan::HTTPServer::HTTPServer () | |
clan::HTTPServer::~HTTPServer () | |
Operations | |
void | clan::HTTPServer::bind (const SocketName &name) |
Bind. More... | |
void | clan::HTTPServer::add_handler (const HTTPRequestHandler &handler) |
Add handler. More... | |
void | clan::HTTPServer::remove_handler (const HTTPRequestHandler &handler) |
Remove handler. More... | |
Construction | |
clan::HTTPServerConnection::HTTPServerConnection () | |
Construct a null instance. More... | |
clan::HTTPServerConnection::HTTPServerConnection (const std::shared_ptr< HTTPServerConnection_Impl > &impl) | |
Constructs a HTTPServerConnection. More... | |
clan::HTTPServerConnection::~HTTPServerConnection () | |
Attributes | |
bool | clan::HTTPServerConnection::is_null () const |
Returns true if this object is invalid. More... | |
void | clan::HTTPServerConnection::throw_if_null () const |
Throw an exception if this object is invalid. More... | |
std::string | clan::HTTPServerConnection::get_request_type () |
Get Request type. More... | |
std::string | clan::HTTPServerConnection::get_request_url () |
Get Request url. More... | |
std::string | clan::HTTPServerConnection::get_request_headers () |
Get Request headers. More... | |
Operations | |
DataBuffer | clan::HTTPServerConnection::read_request_data () |
Read request data. More... | |
void | clan::HTTPServerConnection::write_response_status (int status_code, const std::string &status_text=std::string()) |
Write response status. More... | |
void | clan::HTTPServerConnection::write_response_headers (const std::string &headers) |
Write response headers. More... | |
void | clan::HTTPServerConnection::write_response_data (const DataBuffer &data) |
Write response data. More... | |
clan::HTTPRequestHandler::HTTPRequestHandler | ( | ) |
Constructs a null instance.
clan::HTTPRequestHandler::HTTPRequestHandler | ( | HTTPRequestHandlerProvider * | provider | ) |
Constructs a HTTPRequestHandler.
provider | = HTTPRequest Handler Provider |
clan::HTTPServer::HTTPServer | ( | ) |
clan::HTTPServerConnection::HTTPServerConnection | ( | ) |
Construct a null instance.
clan::HTTPServerConnection::HTTPServerConnection | ( | const std::shared_ptr< HTTPServerConnection_Impl > & | impl | ) |
Constructs a HTTPServerConnection.
impl | = Shared Ptr |
clan::HTTPRequestHandler::~HTTPRequestHandler | ( | ) |
|
inlinevirtual |
clan::HTTPServer::~HTTPServer | ( | ) |
clan::HTTPServerConnection::~HTTPServerConnection | ( | ) |
void clan::HTTPServer::add_handler | ( | const HTTPRequestHandler & | handler | ) |
Add handler.
handler | = HTTPRequest Handler |
void clan::HTTPServer::bind | ( | const SocketName & | name | ) |
Bind.
name | = Socket Name |
HTTPRequestHandlerProvider* clan::HTTPRequestHandler::get_provider | ( | ) | const |
Get Provider.
std::string clan::HTTPServerConnection::get_request_headers | ( | ) |
Get Request headers.
std::string clan::HTTPServerConnection::get_request_type | ( | ) |
Get Request type.
std::string clan::HTTPServerConnection::get_request_url | ( | ) |
Get Request url.
|
pure virtual |
Handle request.
connection | = HTTPServer Connection |
void clan::HTTPRequestHandler::handle_request | ( | HTTPServerConnection & | connection | ) |
Handle request.
connection | = HTTPServer Connection |
|
pure virtual |
bool clan::HTTPRequestHandler::is_handling_request | ( | const std::string & | type, |
const std::string & | url, | ||
const std::string & | headers | ||
) |
|
inline |
Returns true if this object is invalid.
|
inline |
Returns true if this object is invalid.
DataBuffer clan::HTTPServerConnection::read_request_data | ( | ) |
Read request data.
void clan::HTTPServer::remove_handler | ( | const HTTPRequestHandler & | handler | ) |
Remove handler.
handler | = HTTPRequest Handler |
void clan::HTTPRequestHandler::throw_if_null | ( | ) | const |
Throw an exception if this object is invalid.
void clan::HTTPServerConnection::throw_if_null | ( | ) | const |
Throw an exception if this object is invalid.
void clan::HTTPServerConnection::write_response_data | ( | const DataBuffer & | data | ) |
Write response data.
data | = Data Buffer |
void clan::HTTPServerConnection::write_response_headers | ( | const std::string & | headers | ) |
Write response headers.
headers | = String Ref8 |
void clan::HTTPServerConnection::write_response_status | ( | int | status_code, |
const std::string & | status_text = std::string() |
||
) |
Write response status.
status_code | = value |
status_text | = String Ref8 |