public void Close()
        {
            mTcp.Close();


            List <Session> list = new List <Session>(mSessionList);

            foreach (Session c in list)
            {
                c.Disconnect();
            }
            mSessionList.Clear();
            list.Clear();
        }
Пример #2
0
 /// <summary>
 /// 断开连接
 /// </summary>
 public void Disconnect()
 {
     if (mTcp != null)
     {
         mTcp.Close();
     }
     if (mUdp != null)
     {
         mUdp.Close();
     }
     if (mKcp != null)
     {
         mKcp.Close();
     }
 }
Пример #3
0
 public void Disconnect()
 {
     if (mTcp != null)
     {
         mTcp.Close();
     }
     //if (mUdp != null)
     //{
     //    mUdp.Close();
     //}
     //if(mKcp!=null)
     //{
     //    mKcp.Close();
     //}
 }