Beispiel #1
0
 /// <summary>
 /// 外包关闭
 /// </summary>
 public void End()
 {
     //Main.Debug("==End==");
     if (state != -100)
     {
         state = -100;
         if (socket != null)
         {
             socket.Close();
             socket = null;
         }
         if (recvThraed != null)
         {
             recvThraed.Abort();
             recvThraed = null;
         }
         if (m_Kcp != null)
         {
             m_Kcp.Release();
             m_Kcp = null;
         }
         m_NeedUpdateFlag   = false;
         recvBuf            = null;
         ConnectResultEvent = null;
         DisConnectEvent    = null;
         server_addr        = null;
     }
 }