We use cookies to serve our customers and website visitors in the best possible way. Cookies are used for the proper functioning of the website and for improving the user experience, monitoring visitor traffic and marketing purposes. By continuing to browse the site, you agree to our use of cookies. You can read more about cookies here.
com.vaadin.flow.internal.
Package com.vaadin.flow.internal
Class NetworkUtil
java.lang.Object
com.vaadin.flow.internal.NetworkUtil
Utility class for network related methods.
For internal use only. May be renamed or removed in a future release.
-
Method Summary
Modifier and TypeMethodDescriptionstatic int
Returns an available tcp port in the system.
static boolean
isFreePort
(int port) Checks if the given port is free.
-
Method Details
-
getFreePort
public static int getFreePort()Returns an available tcp port in the system.
Returns:
a port number which is not busy
-
isFreePort
public static boolean isFreePort(int port) Checks if the given port is free.
Parameters:
port
- the port to checkReturns:
true if the port is free, false otherwise
-