Kyoto Tycoon
|
Interface to process each request. More...
#include <kthttp.h>
Public Member Functions | |
virtual | ~Worker () |
Destructor. | |
virtual int32_t | process (HTTPServer *serv, Session *sess, const std::string &path, HTTPClient::Method method, const std::map< std::string, std::string > &reqheads, const std::string &reqbody, std::map< std::string, std::string > &resheads, std::string &resbody, const std::map< std::string, std::string > &misc)=0 |
Process each request. | |
virtual bool | process_binary (ThreadedServer *serv, ThreadedServer::Session *sess) |
Process each binary request. | |
virtual void | process_idle (HTTPServer *serv) |
Process each idle event. | |
virtual void | process_timer (HTTPServer *serv) |
Process each timer event. | |
virtual void | process_start (HTTPServer *serv) |
Process the starting event. | |
virtual void | process_finish (HTTPServer *serv) |
Process the finishing event. |
Interface to process each request.
virtual kyototycoon::HTTPServer::Worker::~Worker | ( | ) | [virtual] |
Destructor.
virtual int32_t kyototycoon::HTTPServer::Worker::process | ( | HTTPServer * | serv, |
Session * | sess, | ||
const std::string & | path, | ||
HTTPClient::Method | method, | ||
const std::map< std::string, std::string > & | reqheads, | ||
const std::string & | reqbody, | ||
std::map< std::string, std::string > & | resheads, | ||
std::string & | resbody, | ||
const std::map< std::string, std::string > & | misc | ||
) | [pure virtual] |
Process each request.
serv | the server. |
sess | the session with the client. |
path | the path of the requested resource. |
method | the kind of the request methods. |
reqheads | a string map which contains the headers of the request. Header names are converted into lower cases. The empty key means the request-line. |
reqbody | a string which contains the entity body of the request. |
resheads | a string map to contain the headers of the response. |
resbody | a string to contain the entity body of the response. |
misc | a string map which contains miscellaneous information. "url" means the absolute URL. "query" means the query string of the URL. |
virtual bool kyototycoon::HTTPServer::Worker::process_binary | ( | ThreadedServer * | serv, |
ThreadedServer::Session * | sess | ||
) | [virtual] |
Process each binary request.
serv | the server. |
sess | the session with the client. |
virtual void kyototycoon::HTTPServer::Worker::process_idle | ( | HTTPServer * | serv | ) | [virtual] |
Process each idle event.
serv | the server. |
virtual void kyototycoon::HTTPServer::Worker::process_timer | ( | HTTPServer * | serv | ) | [virtual] |
Process each timer event.
serv | the server. |
virtual void kyototycoon::HTTPServer::Worker::process_start | ( | HTTPServer * | serv | ) | [virtual] |
Process the starting event.
serv | the server. |
virtual void kyototycoon::HTTPServer::Worker::process_finish | ( | HTTPServer * | serv | ) | [virtual] |
Process the finishing event.
serv | the server. |