SocketImpl.connect

SocketImpl.connect

Class Overview | Class Members | This Package | All Packages

Syntax 1
protected abstract void connect( String host, int port ) throws IOException
Parameters
host
the name of the remote host.
port
the port number.
Description
Connects this socket to the specified port on the named host.

Exceptions
IOException if an I/O error occurs when connecting to the remote host.



Syntax 2
protected abstract void connect( InetAddress address, int port ) throws IOException
Parameters
address
the IP address of the remote host.
port
the port number.
Description
Connects this socket to the specified port number on the specified host.

Exceptions
IOException if an I/O error occurs when attempting a connection.