- localAddr
- the specific address and port on the local machine to bind to.
Type Reason Java.Lang.IllegalArgumentException if the given SocketAddress is invalid or not supported. Java.IO.IOException if the socket is already bound or an error occurs while binding.
Binds this socket to the given local host address and port specified by the SocketAddress localAddr. If localAddr is set to null, this socket will be bound to an available local address on any free port.