Code example for InetSocketAddress

Methods: getHostName, getPort

0
        this(null, null, null, null, params);
    } 
     
    private SSLContext getSSLContext(final IOSession iosession) {
        InetSocketAddress address = (InetSocketAddress) iosession.getRemoteAddress();
        String host = address.getHostName() + ":" + address.getPort();
        SSLContext customContext = null;
        if (sslByHostMap != null) {
            // See if there's a custom SSL profile configured for this server 
            customContext = sslByHostMap.get(host);
        } 
        if (customContext != null) {
            return customContext;
        } else { 
            return ssl != null ? ssl.getContext() : null;
        } 
    } 
 
    public DefaultNHttpClientConnection createConnection( 
            final IOSession iosession, final HttpRoute route) {
        IOSession customSession;