Code example for Socket

Methods: setSoLingersetSoTimeoutsetTcpNoDelay

    protected void prepareSocket( 
            final Socket sock,
            final HttpContext context,
            final HttpParams params) throws IOException {
        int linger = HttpConnectionParams.getLinger(params);
        if (linger >= 0) {
            sock.setSoLinger(linger > 0, linger);
     * Resolves the given host name to an array of corresponding IP addresses, based on the 
     * configured name service on the system. 
     * @param host host name to resolve 
     * @return array of IP addresses 
Contextual code suggestions in your IDE  Get Codota for Java