public void Disconnect(Socket socks) { try { if (sock != null) { socks.Shutdown(SocketShutdown.Both); } } catch (ObjectDisposedException) { } catch (Exception) { } }