org.eclipse.ocl.examples.debug.vm.utils
Class SocketUtil
java.lang.Object
org.eclipse.ocl.examples.debug.vm.utils.SocketUtil
public class SocketUtil
- extends java.lang.Object
Method Summary |
boolean |
close(java.io.InputStream is)
|
boolean |
close(java.io.OutputStream os)
|
boolean |
close(java.net.ServerSocket socket)
|
boolean |
close(java.net.Socket socket)
|
static int |
findFreePort()
Returns a free port number on localhost, or -1 if unable to find a free port. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
debugCore
@NonNull
protected final VMDebugCore debugCore
SocketUtil
public SocketUtil(@NonNull
VMDebugCore debugCore)
findFreePort
public static int findFreePort()
- Returns a free port number on localhost, or -1 if unable to find a free port.
- Returns:
- a free port number on localhost, or -1 if unable to find a free port
- Since:
- 3.0
close
public boolean close(java.net.Socket socket)
close
public boolean close(java.net.ServerSocket socket)
close
public boolean close(java.io.InputStream is)
close
public boolean close(java.io.OutputStream os)