?? clistensocket.h
字號:
//
// CListenSocket.h
// Created by Qiming Lu, 2002-02-25
//
#if !defined(__CListenSocket_h__)
#define __CListenSocket_h__
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include <afxtempl.h>
//////////////////////////////////////////////////////////////////////////////
class CListenSocket
{
public:
CListenSocket();
virtual ~CListenSocket();
// Attributes
protected:
SOCKET m_hSocket; // Socket handle
bool m_bListening; // Listening thread active flag
HANDLE m_hThrdFinish; // Listening thread terminate event
int m_nLimitCount; // Max connection
public:
CList <SOCKET, SOCKET> m_ClientList;
public:
bool Create(int inPort);
bool StartListen(void);
void StopListen(void);
bool Accept(void);
// Limit connection feature
void SetLimitConnection(int inMax);
int GetLimitConnection(void);
static UINT ListeningThrd(void *pParam);
};
#endif // !defined(__CListenSocket_h__)
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -