@@ -85,7 +85,8 @@ public static void main(String[] args) {
8585 int minMsgSize = intArg (cmd , 's' , 0 );
8686 int maxRedirects = intArg (cmd , 'd' , 0 );
8787 int timeLimit = intArg (cmd , 'z' , 0 );
88- final int bufferSize = intArg (cmd , 'b' , -1 );
88+ final int sendBufferSize = intArg (cmd , 'b' , -1 );
89+ final int receiveBufferSize = intArg (cmd , 'c' , -1 );
8990 List flags = lstArg (cmd , 'f' );
9091
9192 //setup
@@ -102,10 +103,11 @@ public static void main(String[] args) {
102103 Connection conn = new ConnectionFactory (params ){
103104 @ Override public void configureSocket (Socket socket ) throws IOException {
104105 super .configureSocket (socket );
105- if (bufferSize > 0 ){
106- socket .setReceiveBufferSize (bufferSize );
107- socket .setSendBufferSize (bufferSize );
108- }
106+ if (receiveBufferSize > 0 )
107+ socket .setReceiveBufferSize (receiveBufferSize );
108+ if (sendBufferSize > 0 )
109+ socket .setSendBufferSize (sendBufferSize );
110+
109111 }
110112 }.newConnection (addresses , maxRedirects );
111113 consumerConnections [i ] = conn ;
0 commit comments