#ifndef __WSUSER_H__ #define __WSUSER_H__ #include "WebMsg.h" #include "WebUser.h" class WsUser : public WebUser { public: #if defined(HG_CMP_MSC) WsUser(class WebServer *server, HGUInt id, const char *ip, uint16_t port, SOCKET sockConn); #else WsUser(class WebServer*server, HGUInt id, const char *ip, uint16_t port, int sockConn); #endif virtual ~WsUser(); void HandleCmd(const WsCmdParam* param); protected: virtual void ThreadFunc(); private: bool ShakeHand(const std::string& head); void Pong(); bool SendResponse(const HGByte* data, HGUInt size, HGBool text); }; #endif /* __WSUSER_H__ */