code_app/sdk/webservice/HttpUser.h

28 lines
650 B
C
Raw Normal View History

2022-05-03 10:25:52 +00:00
#ifndef __HTTPUSER_H__
#define __HTTPUSER_H__
#include "WebMsg.h"
#include "WebUser.h"
class HttpUser : public WebUser
{
public:
#if defined(HG_CMP_MSC)
HttpUser(class WebServer* server, HGUInt id, const char* ip, uint16_t port, SOCKET sockConn);
#else
HttpUser(class WebServer* server, HGUInt id, const char* ip, uint16_t port, int sockConn);
#endif
virtual ~HttpUser();
void HandleCmd(const HttpCmdParam* param);
protected:
virtual void ThreadFunc();
private:
bool SendResponse(const char* httpVersion, HGUInt errCode, const char* errInfo,
const HGByte *data, HGUInt size, const char *contentType);
};
#endif /* __HTTPUSER_H__ */