mmysock.h
上传用户:tengfei
上传日期:2014-02-20
资源大小:423k
文件大小:1k
- #ifndef _MMMYSOCK_
- #define _MMMYSOCK_
- #define MAXCLIENTNUM 1
- // MySock.h : header file
- //
- #include "stdafx.h"
- #include <Winsock2.h>
- class AFX_EXT_CLASS CBaseSrv
- {
- public:
- CBaseSrv();
- ~CBaseSrv();
- bool Create(UINT Serport);
- bool Accept();
- static void thread(void *pp);
- void thread_process();
- virtual void OnAccept(SOCKET nSock);
- void Close();
- SOCKET sock,newsock;
- bool thread_unrunning;
- HANDLE thread_handle,threadtest_handle;
- DWORD ThreadID,ThreadtestID;
- bool Create_Finished;
- char cli_name[64];
- char cli_ip[32];
- int clientnum;
- struct sockaddr_in SockAddr;
- struct sockaddr tcpaddr;
- int length,len;
- };
- #endif