NetChatingThread.h
上传用户:maryhy001
上传日期:2007-05-02
资源大小:2317k
文件大小:1k
- //NetChatingThread.h
- #ifndef _NETCHATING_THREAD_H
- #define _NETCHATING_THREAD_H
- #include "udp.h"
- #include "thread.h"
- #include "package.h"
- class NETLIBDLLEXPORT CUDPServerThread: public CThread
- {
- public:
- CUDPServerThread();
- ~CUDPServerThread();
- bool Create(UINT nPort, bool bCreateAndSuspended = false, LPVOID lpParam = NULL);
-
- void SetMsgWnd(HWND hMsgWnd, UINT wmMsgId);
-
- void SetResponsePackage(char *pResponsePackage, const int nPackageSize);
- protected:
- //overrides execute function.
- void Execute();
- private:
- HWND m_hMsgWnd; //msg receiver window's handle.
- UINT m_uMsgId; //msg identity.
- CUDPServer *m_pchatSvr; //chat server socket.(UDP)
-
- int m_nResPackageSize; //response package size.
- char *m_pResponsePackage;//response package buffer.
- };
- #endif //!_NETCHATING_THREAD_H