Socket
public Socket(InetAddress address,
int port,
InetAddress localAddr,
int localPort)
throws IOException
Creates a socket and connects it to the specified remote address on the specified remote port. The Socket will also bind() to the local address and port supplied.
If there is a security manager, its checkConnect method is called with the host address and port as its arguments. This could result in a SecurityException.
Parameters:
address - the remote address
port - the remote port
localAddr - the local address the socket is bound to
localPort - the local port the socket is bound to
Partager