org.eclipse.jdt.launching
Class SocketUtil
java.lang.Object
|
+--org.eclipse.jdt.launching.SocketUtil
- public class SocketUtil
- extends Object
Utility class to find a port to debug on.
Method Summary |
static int |
findUnusedLocalPort(String host,
int searchFrom,
int searchTo)
Returns a free port number on the specified host within the given range,
or -1 if none found. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SocketUtil
public SocketUtil()
findUnusedLocalPort
public static int findUnusedLocalPort(String host,
int searchFrom,
int searchTo)
- Returns a free port number on the specified host within the given range,
or -1 if none found.
- Parameters:
host
- name or IP addres of host on which to find a free portsearchFrom
- the port number from which to start searchingsearchTo
- the port number at which to stop searching
- Returns:
- a free port in the specified range, or -1 of none found
Copyright (c) IBM Corp. and others 2000, 2002. All Rights Reserved.