Adbase
Adinf C++ base library V2
adbase::http::Server Class Reference

#include <Server.hpp>

Public Member Functions

 Server (Config httpConfig)
 
void start (int threadNum=1)
 启动server More...
 
void stop ()
 
void registerLocation (const std::string &location, const OnRequest &process, void *data)
 向 server 中注册location More...
 
void setLocationFallback (const OnLocationFallback &fallback)
 
void onRequestCallback (evhttp_request *req)
 
void threadFunc (int pipeFd)
 
virtual ~Server ()
 

Static Public Member Functions

static void deleteThread (std::thread *t)
 

Detailed Description

Definition at line 36 of file Server.hpp.

Constructor & Destructor Documentation

virtual adbase::http::Server::~Server ( )
inlinevirtual

Definition at line 48 of file Server.hpp.

Member Function Documentation

void adbase::http::Server::deleteThread ( std::thread *  t)
static

Definition at line 229 of file Server.cpp.

References LOG_ERROR.

Referenced by start().

void adbase::http::Server::registerLocation ( const std::string &  location,
const OnRequest process,
void *  data 
)

向 server 中注册location

Definition at line 238 of file Server.cpp.

References LOG_DEBUG, LOG_INFO, and adbase::trim().

void adbase::http::Server::start ( int  threadNum = 1)
void adbase::http::Server::stop ( )

Definition at line 208 of file Server.cpp.

References LOG_ERROR.


The documentation for this class was generated from the following files: