1 #ifndef WSJCPP_LIGHT_WEB_SERVER_H 2 #define WSJCPP_LIGHT_WEB_SERVER_H 5 #include <sys/socket.h> 17 const std::string &
name();
31 const std::string &sName,
33 std::vector<WsjcppLightWebHttpHandlerBase *> *pVHandlers
57 void setPort(
int nPort);
58 void setMaxWorkers(
int nMaxWorkers);
65 void checkAndRestartWorkers();
66 void stopAndRemoveWorkers();
67 std::string readAddress(
int nSockFd);
75 std::vector<WsjcppLightWebHttpThreadWorker *>
m_vWorkers;
78 struct sockaddr_in m_serverAddress;
82 #endif // WSJCPP_LIGHT_WEB_SERVER_H int m_nPort
Definition: wsjcpp_light_web_server.h:73
Definition: wsjcpp_light_web_server.h:53
std::string TAG
Definition: wsjcpp_light_web_server.h:68
WsjcppLightWebDequeHttpRequests * m_pDeque
Definition: wsjcpp_light_web_server.h:69
Definition: wsjcpp_light_web_deque_http_requests.h:12
WsjcppLightWebHttpHandlerBase(const std::string &sName)
Definition: wsjcpp_light_web_server.cpp:9
std::vector< WsjcppLightWebHttpHandlerBase * > * m_pVHandlers
Definition: wsjcpp_light_web_server.h:45
Definition: wsjcpp_light_web_http_request.h:22
pthread_t m_serverThread
Definition: wsjcpp_light_web_server.h:48
Definition: wsjcpp_light_web_server.h:14
std::vector< WsjcppLightWebHttpHandlerBase * > * m_pVHandlers
Definition: wsjcpp_light_web_server.h:74
virtual bool canHandle(const std::string &sWorkerId, WsjcppLightWebHttpRequest *pRequest)=0
const std::string & name()
Definition: wsjcpp_light_web_server.cpp:15
int m_nSockFd
Definition: wsjcpp_light_web_server.h:77
Definition: wsjcpp_light_web_server.h:27
std::string m_sName
Definition: wsjcpp_light_web_server.h:43
std::string TAG
Definition: wsjcpp_light_web_server.h:42
std::vector< WsjcppLightWebHttpThreadWorker * > m_vWorkers
Definition: wsjcpp_light_web_server.h:75
int m_nMaxWorkers
Definition: wsjcpp_light_web_server.h:72
WsjcppLightWebDequeHttpRequests * m_pDeque
Definition: wsjcpp_light_web_server.h:44
bool m_bStop
Definition: wsjcpp_light_web_server.h:46
bool m_bStop
Definition: wsjcpp_light_web_server.h:70
virtual bool handle(const std::string &sWorkerId, WsjcppLightWebHttpRequest *pRequest)=0
bool m_bStopped
Definition: wsjcpp_light_web_server.h:47
pthread_t m_serverThread
Definition: wsjcpp_light_web_server.h:79
std::string m_sName
Definition: wsjcpp_light_web_server.h:22