public static void Close(Socket socket) { if (socket == null) { return; } ExUtil.IgnoreException(() => { socket.Close(10000); }); }
public static void ShutDown(Socket socket) { if (socket == null) { return; } ExUtil.IgnoreException(() => { socket.Shutdown(SocketShutdown.Both); socket.Close(10000); }); }