GameServerWorkerThread.h
上传用户:dzyhzl
上传日期:2019-04-29
资源大小:56270k
文件大小:1k
源码类别:

模拟服务器

开发平台:

C/C++

  1. /********************************************************************
  2. created: 2003/02/15
  3. file base: GameServerWorkerThread
  4. file ext: h
  5. author: liupeng
  6. purpose:
  7. *********************************************************************/
  8. #ifndef __INCLUDE_ONLINEGAME_GAMESERVERWORKERTHREAD_H__
  9. #define __INCLUDE_ONLINEGAME_GAMESERVERWORKERTHREAD_H__
  10. #if defined (_MSC_VER) && (_MSC_VER >= 1020)
  11. #pragma once
  12. #endif
  13. #include "IOCPServerSocketServer.h"
  14. /*
  15.  * Classes defined in other files...
  16.  */
  17. namespace OnlineGameLib {
  18. namespace Win32 {
  19. //[ Include in ...IPCPServer
  20. class CIOBuffer;
  21. //]
  22. } // End of namespace OnlineGameLib
  23. } // End of namespace Win32
  24. class CGameServerWorkerThread : public OnlineGameLib::Win32::CSocketServer::WorkerThread
  25. {
  26. public:
  27. explicit CGameServerWorkerThread( OnlineGameLib::Win32::CIOCompletionPort &iocp );
  28. virtual ~CGameServerWorkerThread();
  29. private:
  30. virtual void ReadCompleted(
  31. OnlineGameLib::Win32::CSocketServer::Socket *pSocket,
  32. OnlineGameLib::Win32::CIOBuffer *pBuffer);
  33. virtual void OnBeginProcessing();
  34. virtual void OnEndProcessing();
  35. virtual void OnError( const OnlineGameLib::Win32::_tstring &message );
  36. /*
  37.  * No copies do not implement
  38.  */
  39. CGameServerWorkerThread( const CGameServerWorkerThread &rhs );
  40. CGameServerWorkerThread &operator=( const CGameServerWorkerThread &rhs ); 
  41. };
  42. #endif //__INCLUDE_ONLINEGAME_GAMESERVERWORKERTHREAD_H__