void ThreadRun() { if (m_tcp != null) { m_tcp.Close(); } else { m_tcp = new CTcp(); } m_tcp.ConnectToServer(m_szConnectAddr, m_nConnectPort, m_nRandSeed); if (m_tcp.IsConnect()) { OnSucConnect(); } else { OnFailedConect(); } // 开始接收消息吧 BeginRecive(); }
public void Close() { m_tcp.Close(); m_nPrepareReadSize = 0; m_nReadPos = 0; }