public void Dispose() { if (!this.Disconnected) { this.Disconnected = true; try { this.Socket.Shutdown(SocketShutdown.Both); this.Socket.Close(); this.Socket.Dispose(); if (this.Buffer != null) { Array.Clear(this.Buffer, 0, this.Buffer.Length); } } catch { } this.Buffer = null; this.ReceiveCallback = null; this.SendCallback = null; this.ReceivedDataDelegate = null; Skylight.GetSocketsManager().Disconnection(this.ID); if (Skylight.GetConfig()["emu.messages.connections"] == "1") { Logging.WriteLine(">> Connection Dropped [" + this.ID + "] from [" + this.GetIP() + "] for reason: " + this.DisconnectReason); } } GC.SuppressFinalize(this); }