private void Dispose(bool Disposing) { if (!this.mDisposed && Disposing) { this.mDisposed = true; try { base.Shutdown(SocketShutdown.Both); base.Close(); base.Dispose(); } catch { } Array.Clear(this.mDataBuffer, 0, this.mDataBuffer.Length); this.mDataBuffer = null; this.mDataReceivedCallback = null; this.mRouteReceivedDataCallback = null; PhoenixEnvironment.GetConnectionManager().DropConnection(this.mID); TcpAuthorization.FreeConnection(this.mIP); if (PhoenixEnvironment.GetConfig().data["emu.messages.connections"] == "1") { Console.WriteLine(string.Concat(new object[] { ">> Connection Dropped [", this.mID, "] from [", this.ipAddress, "]" })); } } }
public void StopClient(uint ClientId) { GameClient Session = this.GetClient(ClientId); if (Session != null) { PhoenixEnvironment.GetConnectionManager().DropConnection(ClientId); Session.Stop(); this.Session[ClientId] = null; } }