@Immutable public final class NetworkPortHelper extends Object
| Modifier and Type | Method and Description |
|---|---|
static ENetworkPortStatus |
checkPortOpen(String sHostName,
int nPort,
int nTimeoutMillisecs)
Check the status of a remote port.
|
static boolean |
isValidPort(int nPort)
Check of the passed port number is theoretically valid.
|
public static boolean isValidPort(int nPort)
nPort - The port number to be tested.true if the port number is valid, false
otherwise.@Nonnull public static ENetworkPortStatus checkPortOpen(@Nonnull @Nonempty String sHostName, @Nonnegative int nPort, @Nonnegative int nTimeoutMillisecs)
sHostName - Hostname or IP address to check.nPort - Port number to check.nTimeoutMillisecs - Connection timeout in milliseconds.null.Copyright © 2016–2019 Philip Helger. All rights reserved.