5 class CWebClientSocket
: public CAsyncSocket
7 CWebServer
* m_pWebServer
;
8 CMainFrame
* m_pMainFrame
;
12 struct cookie_attribs
{CString path
, expire
, domain
;};
13 CAtlStringMap
<cookie_attribs
> m_cookieattribs
;
19 void OnReceive(int nErrorCode
);
20 void OnClose(int nErrorCode
);
23 CWebClientSocket(CWebServer
* pWebServer
, CMainFrame
* pMainFrame
);
24 virtual ~CWebClientSocket();
26 bool SetCookie(CString name
, CString value
= _T(""), __time64_t expire
= -1, CString path
= _T("/"), CString domain
= _T(""));
29 CString m_cmd
, m_path
, m_query
, m_ver
;
31 CAtlStringMap
<> m_hdrlines
;
32 CAtlStringMap
<> m_get
, m_post
, m_cookie
;
33 CAtlStringMap
<> m_request
;
35 bool OnCommand(CStringA
& hdr
, CStringA
& body
, CStringA
& mime
);
36 bool OnIndex(CStringA
& hdr
, CStringA
& body
, CStringA
& mime
);
37 bool OnBrowser(CStringA
& hdr
, CStringA
& body
, CStringA
& mime
);
38 bool OnControls(CStringA
& hdr
, CStringA
& body
, CStringA
& mime
);
39 bool OnStatus(CStringA
& hdr
, CStringA
& body
, CStringA
& mime
);
40 bool OnError404(CStringA
& hdr
, CStringA
& body
, CStringA
& mime
);
41 bool OnPlayer(CStringA
& hdr
, CStringA
& body
, CStringA
& mime
);
42 bool OnSnapShotJpeg(CStringA
& hdr
, CStringA
& body
, CStringA
& mime
);
43 bool OnConvRes(CStringA
& hdr
, CStringA
& body
, CStringA
& mime
);