- remoteAddr
- the address and port of the remote host to connect to.
- timeout
- the timeout value in milliseconds or 0 for an infinite timeout.
Type Reason Java.Lang.IllegalArgumentException if the given SocketAddress is invalid or not supported or the timeout value is negative. Java.IO.IOException if the socket is already connected or an error occurs while connecting.
Connects this socket to the given remote host address and port specified by the SocketAddress remoteAddr with the specified timeout. The connecting method will block until the connection is established or an error occurred.