int m_iFakeClient; //real sock num
bool m_bFakeConnect; //real sock connected
protected:
SOCKET m_Socket; //socket
UINT m_iClient; //Current Client array number
BOOL m_bConnected;
BOOL m_bCencelIO;
long m_lPort;
DWORD m_dwInitCnt;
};
struct _SocInfo
{
BOOL bListen;
int nIndex;
TCHAR szTitle[25];
TCHAR szLocalIP[25];
TCHAR szIP[25];
int nPort;
int nRecvSockBuffer;
int nSendSockBuffer;
int nReadQueueBuffer;
int nSendQueueBuffer;
};
#define FILE_CONNECT L"connect.txt"
class CIOCPNet;
class CMultiToken
{
public:
CMultiToken(){}
~CMultiToken();
BOOL Connect(CIOCPNet* pNet);
void KeepAlive();
int DisConnect(int nClient);
void SendReady(int iClient,int nServer,BOOL bSend = FALSE);
BOOL Analize_ConnectData();
virtual void OnConnected(int /*iClient*/, int /*nServer*/) {}
virtual void OnDisConnected(int /*iClient*/, int /*nServer*/) {}
void Connected(int iClient, int nServer);
void DisConnected(int iClient, int nServer);
int GetServerNum() {return m_nServer;}
int GetTotalServerCount() {return m_nSocInfoCount;}