All Downloads are FREE. Search and download functionalities are using the official Maven repository.

panda.net.Sockets Maven / Gradle / Ivy

Go to download

Panda Core is the core module of Panda Framework, it contains commonly used utility classes similar to apache-commons.

There is a newer version: 1.8.0
Show newest version
package panda.net;

import java.net.ServerSocket;
import java.net.Socket;

public class Sockets {
	public static void safeClose(Socket s) {
		if (s != null) {
			try {
				s.close();
			}
			catch (Exception e) {
				//ingonre
			}
		}
	}

	public static void safeClose(ServerSocket s) {
		if (s != null) {
			try {
				s.close();
			}
			catch (Exception e) {
				//ingonre
			}
		}
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy