fhq-server  v0.2.33
Documentation for fhq-server. FreeHackQuest is an open source platform for competitions of computer security.
Public Member Functions | Private Member Functions | Private Attributes | List of all members
WsjcppLightWebServer Class Reference

#include <wsjcpp_light_web_server.h>

Collaboration diagram for WsjcppLightWebServer:
Collaboration graph
[legend]

Public Member Functions

 WsjcppLightWebServer ()
 
void setPort (int nPort)
 
void setMaxWorkers (int nMaxWorkers)
 
void startSync ()
 
void start ()
 
void stop ()
 
void addHandler (WsjcppLightWebHttpHandlerBase *pHandler)
 

Private Member Functions

void checkAndRestartWorkers ()
 
void stopAndRemoveWorkers ()
 
std::string readAddress (int nSockFd)
 

Private Attributes

std::string TAG
 
WsjcppLightWebDequeHttpRequestsm_pDeque
 
bool m_bStop
 
int m_nMaxWorkers
 
int m_nPort
 
std::vector< WsjcppLightWebHttpHandlerBase * > * m_pVHandlers
 
std::vector< WsjcppLightWebHttpThreadWorker * > m_vWorkers
 
int m_nSockFd
 
struct sockaddr_in m_serverAddress
 
pthread_t m_serverThread
 

Constructor & Destructor Documentation

◆ WsjcppLightWebServer()

WsjcppLightWebServer::WsjcppLightWebServer ( )

Member Function Documentation

◆ addHandler()

void WsjcppLightWebServer::addHandler ( WsjcppLightWebHttpHandlerBase pHandler)

◆ checkAndRestartWorkers()

void WsjcppLightWebServer::checkAndRestartWorkers ( )
private

◆ readAddress()

std::string WsjcppLightWebServer::readAddress ( int  nSockFd)
private

◆ setMaxWorkers()

void WsjcppLightWebServer::setMaxWorkers ( int  nMaxWorkers)

◆ setPort()

void WsjcppLightWebServer::setPort ( int  nPort)

◆ start()

void WsjcppLightWebServer::start ( )

◆ startSync()

void WsjcppLightWebServer::startSync ( )

◆ stop()

void WsjcppLightWebServer::stop ( )

◆ stopAndRemoveWorkers()

void WsjcppLightWebServer::stopAndRemoveWorkers ( )
private

Member Data Documentation

◆ m_bStop

bool WsjcppLightWebServer::m_bStop
private

◆ m_nMaxWorkers

int WsjcppLightWebServer::m_nMaxWorkers
private

◆ m_nPort

int WsjcppLightWebServer::m_nPort
private

◆ m_nSockFd

int WsjcppLightWebServer::m_nSockFd
private

◆ m_pDeque

WsjcppLightWebDequeHttpRequests* WsjcppLightWebServer::m_pDeque
private

◆ m_pVHandlers

std::vector<WsjcppLightWebHttpHandlerBase *>* WsjcppLightWebServer::m_pVHandlers
private

◆ m_serverAddress

struct sockaddr_in WsjcppLightWebServer::m_serverAddress
private

◆ m_serverThread

pthread_t WsjcppLightWebServer::m_serverThread
private

◆ m_vWorkers

std::vector<WsjcppLightWebHttpThreadWorker *> WsjcppLightWebServer::m_vWorkers
private

◆ TAG

std::string WsjcppLightWebServer::TAG
private

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