Return-Path: X-Original-To: apmail-hc-commits-archive@www.apache.org Delivered-To: apmail-hc-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id EC28318328 for ; Wed, 16 Dec 2015 16:19:27 +0000 (UTC) Received: (qmail 88120 invoked by uid 500); 16 Dec 2015 16:19:27 -0000 Delivered-To: apmail-hc-commits-archive@hc.apache.org Received: (qmail 88069 invoked by uid 500); 16 Dec 2015 16:19:27 -0000 Mailing-List: contact commits-help@hc.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "HttpComponents Project" Delivered-To: mailing list commits@hc.apache.org Received: (qmail 88060 invoked by uid 99); 16 Dec 2015 16:19:27 -0000 Received: from Unknown (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 16 Dec 2015 16:19:27 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 2602AC06D1 for ; Wed, 16 Dec 2015 16:19:27 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.447 X-Spam-Level: X-Spam-Status: No, score=0.447 tagged_above=-999 required=6.31 tests=[KAM_LAZY_DOMAIN_SECURITY=1, RP_MATCHES_RCVD=-0.554, URIBL_BLOCKED=0.001] autolearn=disabled Received: from mx1-eu-west.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id Dv5_X6Q5doZI for ; Wed, 16 Dec 2015 16:19:15 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-eu-west.apache.org (ASF Mail Server at mx1-eu-west.apache.org) with ESMTP id 1B67220BD8 for ; Wed, 16 Dec 2015 16:19:15 +0000 (UTC) Received: from svn01-us-west.apache.org (svn.apache.org [10.41.0.6]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id D04C9E043D for ; Wed, 16 Dec 2015 16:19:47 +0000 (UTC) Received: from svn01-us-west.apache.org (localhost [127.0.0.1]) by svn01-us-west.apache.org (ASF Mail Server at svn01-us-west.apache.org) with ESMTP id 1AA2E3A070E for ; Wed, 16 Dec 2015 16:19:14 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1720386 - /httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/conn/DefaultHttpClientConnectionOperator.java Date: Wed, 16 Dec 2015 16:19:14 -0000 To: commits@hc.apache.org From: olegk@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20151216161914.1AA2E3A070E@svn01-us-west.apache.org> Author: olegk Date: Wed Dec 16 16:19:13 2015 New Revision: 1720386 URL: http://svn.apache.org/viewvc?rev=1720386&view=rev Log: Set socker buffer send/receive sizes from SocketConfig Contributed by Will Vuong Modified: httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/conn/DefaultHttpClientConnectionOperator.java Modified: httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/conn/DefaultHttpClientConnectionOperator.java URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/conn/DefaultHttpClientConnectionOperator.java?rev=1720386&r1=1720385&r2=1720386&view=diff ============================================================================== --- httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/conn/DefaultHttpClientConnectionOperator.java (original) +++ httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/conn/DefaultHttpClientConnectionOperator.java Wed Dec 16 16:19:13 2015 @@ -28,9 +28,9 @@ package org.apache.http.impl.conn; import java.io.IOException; import java.net.ConnectException; -import java.net.NoRouteToHostException; import java.net.InetAddress; import java.net.InetSocketAddress; +import java.net.NoRouteToHostException; import java.net.Socket; import java.net.SocketTimeoutException; @@ -120,6 +120,13 @@ public class DefaultHttpClientConnection sock.setReuseAddress(socketConfig.isSoReuseAddress()); sock.setTcpNoDelay(socketConfig.isTcpNoDelay()); sock.setKeepAlive(socketConfig.isSoKeepAlive()); + if (socketConfig.getRcvBufSize() > 0) { + sock.setReceiveBufferSize(socketConfig.getRcvBufSize()); + } + if (socketConfig.getSndBufSize() > 0) { + sock.setSendBufferSize(socketConfig.getSndBufSize()); + } + final int linger = socketConfig.getSoLinger(); if (linger >= 0) { sock.setSoLinger(true, linger);