public void Close() { mTcp.Close(); List <Session> list = new List <Session>(mSessionList); foreach (Session c in list) { c.Disconnect(); } mSessionList.Clear(); list.Clear(); }
/// <summary> /// 断开连接 /// </summary> public void Disconnect() { if (mTcp != null) { mTcp.Close(); } if (mUdp != null) { mUdp.Close(); } if (mKcp != null) { mKcp.Close(); } }
public void Disconnect() { if (mTcp != null) { mTcp.Close(); } //if (mUdp != null) //{ // mUdp.Close(); //} //if(mKcp!=null) //{ // mKcp.Close(); //} }