-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathHttpSession.h
More file actions
39 lines (30 loc) · 827 Bytes
/
HttpSession.h
File metadata and controls
39 lines (30 loc) · 827 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#ifndef __HTTPSESSION_H_
#define __HTTPSESSION_H_
#include "HttpRequestParse.h"
class CHttpSession
{
public:
CHttpSession();
~CHttpSession();
int Start(class CHttpServer* pServer, SOCKET sock, SOCKADDR_IN remoteAddr, string strRootPath);
int Stop();
int Pause();
int Resume();
private:
class CHttpRequestParse* m_pHttpParse;
RequestInfo m_stRequestInfo;
string m_strRootPath;
SOCKET m_remoteSock;
SOCKADDR_IN m_remoteAddr;
class CHttpServer* m_pServer;
volatile bool m_bPaused;
volatile bool m_bExit;
pthread_t m_hWorkThread;
static void* WorkThread(void* pParam);
int ParseBuffer(char* pBuffer, int nLen);
int Send(char* pBuffer, int nLen);
int SendHttpError(int nErrorCode);
int SendHttpString(string strData);
int ProcessFileRequest(string strFileName, int nFileStart, int nFileStop);
};
#endif