public static void CleanUp() { // If socket is opened then close it if (sock != null) sock.Close(); }