panda.net.Sockets Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of panda-core Show documentation
Show all versions of panda-core Show documentation
Panda Core is the core module of Panda Framework, it contains commonly used utility classes similar to apache-commons.
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
}
}
}
}