Adbase
Adinf C++ base library V2
adbase::http Namespace Reference

Namespaces

 detail
 

Classes

class  Config
 
class  Request
 
class  Response
 
class  Server
 

Typedefs

typedef std::function< void(Request *request, Response *response, void *data)> OnRequest
 
typedef std::function< const std::string(const std::string &)> OnLocationFallback
 当请求 More...
 

Functions

std::ostream & operator<< (std::ostream &os, const Config &config)
 
std::string defaultFallback (const std::string &url)
 
void httpServerOnRequestProxy (evhttp_request *req, void *data)
 

Variables

thread_local time_t httpLastSecond
 
thread_local char httpLocalTime [32]
 
static char * months []
 

Typedef Documentation

typedef std::function<const std::string (const std::string&)> adbase::http::OnLocationFallback

当请求

Definition at line 34 of file Server.hpp.

typedef std::function<void (Request* request, Response* response, void* data)> adbase::http::OnRequest

Definition at line 28 of file Server.hpp.

Function Documentation

std::string adbase::http::defaultFallback ( const std::string &  url)

Definition at line 41 of file Server.cpp.

Referenced by adbase::http::Server::Server().

void adbase::http::httpServerOnRequestProxy ( evhttp_request *  req,
void *  data 
)

Definition at line 58 of file Server.cpp.

References adbase::http::Server::onRequestCallback().

Referenced by adbase::http::Server::threadFunc().

std::ostream& adbase::http::operator<< ( std::ostream &  os,
const Config config 
)

Definition at line 95 of file Config.cpp.

Variable Documentation

thread_local time_t adbase::http::httpLastSecond

Definition at line 14 of file Server.cpp.

thread_local char adbase::http::httpLocalTime[32]

Definition at line 15 of file Server.cpp.

char* adbase::http::months[]
static
Initial value:
= { "Jan", "Feb", "Mar", "Apr", "May", "Jun",
"Jul", "Aug", "Sep", "Oct", "Nov", "Dec" }

Definition at line 18 of file Server.cpp.