Exemple #1
0
 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();
 }
Exemple #2
0
 public bool IsConnect()
 {
     return(m_tcp.IsConnect());
 }