@Deprecated public final class SocketUtils extends Object
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_PORT_RANGE_MAX
Deprecated.
|
static int |
DEFAULT_PORT_RANGE_MIN
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
static int |
findAvailableServerSocket()
Deprecated.
Determines a free available server socket (port) using an automatically
chosen start seed port.
|
static int |
findAvailableServerSocket(int seed)
Deprecated.
Determines a free available server socket (port) using the 'seed' value as
the starting port.
|
static List<Integer> |
findAvailableServerSockets(int seed,
int numberOfRequestedPorts)
Deprecated.
Determines a free available server socket (port) using the 'seed' value as
the starting port.
|
static int |
findAvailableUdpSocket()
Deprecated.
Determines a free available Udp socket using an automatically
chosen start seed port.
|
static int |
findAvailableUdpSocket(int seed)
Deprecated.
Determines a free available Udp socket (port) using the 'seed' value as
the starting port.
|
static List<Integer> |
findAvailableUdpSockets(int seed,
int numberOfRequestedPorts)
Deprecated.
Determines free available udp socket(s) (port) using the 'seed' value as
the starting port.
|
static int |
getRandomSeedPort()
Deprecated.
|
public static final int DEFAULT_PORT_RANGE_MIN
public static final int DEFAULT_PORT_RANGE_MAX
public static int findAvailableServerSocket(int seed)
seed
- The starting port, which must not be negative.IllegalStateException
- when no open port was found.public static List<Integer> findAvailableServerSockets(int seed, int numberOfRequestedPorts)
seed
- The starting port, which must not be negative.numberOfRequestedPorts
- How many open ports shall be retrieved?IllegalStateException
- when no open port was found.public static int findAvailableServerSocket()
IllegalStateException
- when no open port was found.public static int findAvailableUdpSocket(int seed)
seed
- The starting port, which must not be negative.IllegalStateException
- when no open port was found.public static List<Integer> findAvailableUdpSockets(int seed, int numberOfRequestedPorts)
seed
- The starting port, which must not be negative.numberOfRequestedPorts
- How many open ports shall be retrieved?IllegalStateException
- when no open port was found.public static int findAvailableUdpSocket()
IllegalStateException
- when no open port was found.public static int getRandomSeedPort()