public void Disconnect(bool send, bool force) { if (m_Dispose) { return; } m_Status = force ? Status.Disconnect : Status.None; if (send) { m_Kcp.SendDisconnect(); } }
public override void Dispose() { lock (this) { if (m_Dispose) { return; } m_Dispose = true; } ClearMsgHandlers(); m_Con.SendDisconnect(); m_Con.Dispose(); m_SendPackets.Clear(); m_RecvPackets.Clear(); }