File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change 5252 */
5353
5454public class ConnectionFactory {
55- public static final int DEFAULT_SOCKET_BUFFER_SIZE = 10 * 1024 ;
55+ public static final int DEFAULT_SOCKET_SEND_BUFFER_SIZE = 10 * 1024 ;
56+ public static final int DEFAULT_SOCKET_RECEIVE_BUFFER_SIZE = 50 * 1024 ;
5657
5758 private final ConnectionParameters _params ;
5859
@@ -185,10 +186,10 @@ protected void configureSocket(Socket socket) throws IOException{
185186 // equalise the throughput for local traffic. This needs more investigation at to
186187 // how it behaves over a network.
187188
188- if (socket .getSendBufferSize () < DEFAULT_SOCKET_BUFFER_SIZE )
189- socket .setSendBufferSize (DEFAULT_SOCKET_BUFFER_SIZE );
190- if (socket .getReceiveBufferSize () < DEFAULT_SOCKET_BUFFER_SIZE )
191- socket .setReceiveBufferSize (DEFAULT_SOCKET_BUFFER_SIZE );
189+ if (socket .getSendBufferSize () < DEFAULT_SOCKET_SEND_BUFFER_SIZE )
190+ socket .setSendBufferSize (DEFAULT_SOCKET_SEND_BUFFER_SIZE );
191+ if (socket .getReceiveBufferSize () < DEFAULT_SOCKET_RECEIVE_BUFFER_SIZE )
192+ socket .setReceiveBufferSize (DEFAULT_SOCKET_RECEIVE_BUFFER_SIZE );
192193 }
193194
194195 private Connection newConnection (Address [] addrs ,
You can’t perform that action at this time.
0 commit comments