hi.
I am trying to write a program like "iperf" that will be measuring TCP bandwidth performance
and I have a problem with changing TCP window size
Code:
for Client:
Socket g = new Socket();
g.setReceiveBufferSize(1472*2); //1472*2 and more
g.setSendBufferSize(1472*2);
g.connect(new InetSocketAddress(ipT, portT));
gniazdo.setReceiveBufferSize(1472*2);
gniazdo.setSendBufferSize(1472*2);
for Server:
ServerSocket s = new ServerSocket();
s.setReceiveBufferSize(1472*2);
InetSocketAddress serverPort = new InetSocketAddress ( port );
s.bind(serverPort);
for reading and writing i use:
DataOutputStream out3 = new DataOutputStream( incoming.getOutputStream());
DataInputStream in3 = new DataInputStream( incoming.getInputStream());
When I check it with
incoming.getReceiveBufferSize();
incoming.getSendBufferSize();
I get properly values.
When I sniffs with a windump i get default tcp window size, and speeds are still the same.
Please HELP!
tested on:
windows XP, windows 98 (standard TCP window size)
10Mb LAN
i use:
jdk 1.5.0
jre 1.5.0_09-b03
BlueJ