org.eclipse.wst.jsdt.debug.core.jsdi.connect

## Class SocketUtil

- java.lang.Object
- - org.eclipse.wst.jsdt.debug.core.jsdi.connect.SocketUtil

    public final class SocketUtil
    extends java.lang.Object

Utility class to find a port to debug on.

Since:
  1.0
Restriction:
  This class is not intended to be instantiated by clients.

### Method Summary

All Methods Static Methods Concrete Methods
`static int` `findFreePort()` Returns a free port number on localhost, or -1 if unable to find a free port.
`static java.lang.String` `findFreePortString()` Returns a free port number encoded as a string

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Method Detail

#### 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

#### findFreePortString

    public static java.lang.String findFreePortString()

Returns a free port number encoded as a string

Returns:
  a free port number encoded as a string