Server.h

Upload User: lidebao1
Upload Date: 2013-05-01
Package Size: 2437k
Code Size: 1k
Category: Windows Develop
Development Platform: Visual C++
  1. // Server.h: interface for the CServer class.
  2. //
  3. //////////////////////////////////////////////////////////////////////
  4. #if !defined(AFX_SERVER_H__28D5187F_175B_45F0_A2C3_1DA78D6B4E2A__INCLUDED_)
  5. #define AFX_SERVER_H__28D5187F_175B_45F0_A2C3_1DA78D6B4E2A__INCLUDED_
  6. #if _MSC_VER > 1000
  7. #pragma once
  8. #endif // _MSC_VER > 1000
  9. #include "winsock.h"
  10. class CExample1Dlg;
  11. class CServer  
  12. {
  13. public:
  14. CServer();
  15. virtual ~CServer();
  16. private:
  17. void ServerInit();
  18. public:
  19. BOOL InitAndListen(HWND hwnd,UINT port);
  20. public:
  21. SOCKET m_hSocket;
  22. sockaddr_in m_addr;
  23. UINT m_uPort;
  24.     HWND m_hWnd;
  25. };
  26. #endif // !defined(AFX_SERVER_H__28D5187F_175B_45F0_A2C3_1DA78D6B4E2A__INCLUDED_)