NetService.h 304 B

12345678910111213141516171819
  1. #pragma once
  2. class CNetService
  3. {
  4. public:
  5. void Start();
  6. void Stop();
  7. void Run();
  8. static CNetService& GetInstance();
  9. private:
  10. HANDLE m_hCompletePort;
  11. bool CreateIOThread();
  12. SOCKET m_hSocket;
  13. HANDLE m_hEvent;
  14. private:
  15. std::thread _thread;
  16. bool _bRunning;
  17. std::vector<std::thread> _walkarray;
  18. };