Code example for HostNameResolver

Methods: resolve

0
local = new InetSocketAddress(localAddress, localPort);
        } 
        InetAddress remoteAddress;
        if (this.nameResolver != null) {
            remoteAddress = this.nameResolver.resolve(host);
        } else { 
            remoteAddress = InetAddress.getByName(host);
        } 
        InetSocketAddress remote = new InetSocketAddress(remoteAddress, port);
        return connectSocket(socket, remote, local, params);
    } 
 
    /** 
     * @deprecated Use {@link #createLayeredSocket(Socket, String, int, boolean)} 
     */ 
    @Deprecated 
    public Socket createSocket(
            final Socket socket,
            final String host, int port,
            boolean autoClose) throws IOException, UnknownHostException {