NetChatingThread.h
上传用户:maryhy001
上传日期:2007-05-02
资源大小:2317k
文件大小:1k
源码类别:

网格计算

开发平台:

Visual C++

  1. //NetChatingThread.h
  2. #ifndef _NETCHATING_THREAD_H
  3. #define _NETCHATING_THREAD_H
  4. #include "udp.h"
  5. #include "thread.h"
  6. #include "package.h"
  7. class NETLIBDLLEXPORT CUDPServerThread: public CThread
  8. {
  9. public:
  10. CUDPServerThread();
  11. ~CUDPServerThread();
  12. bool Create(UINT nPort, bool bCreateAndSuspended = false, LPVOID lpParam = NULL);
  13. void SetMsgWnd(HWND hMsgWnd, UINT wmMsgId);
  14. void SetResponsePackage(char *pResponsePackage, const int nPackageSize);
  15. protected:
  16. //overrides execute function.
  17. void Execute();
  18. private:
  19. HWND m_hMsgWnd; //msg receiver window's handle.
  20. UINT m_uMsgId; //msg identity.
  21. CUDPServer *m_pchatSvr; //chat server socket.(UDP)
  22. int m_nResPackageSize; //response package size.
  23. char *m_pResponsePackage;//response package buffer.
  24. };
  25. #endif //!_NETCHATING_THREAD_H