DD1984 / sockperf

Automatically exported from code.google.com/p/sockperf
Other
1 stars 0 forks source link

support loopback connections - local network connection between server & client on same machine #40

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
To reproduce the problem:
1. ib0 = 4.4.4.10 (IP address of ib0 interface)
2. Run UDP server ob ib0: "sockperf sr -p 10000 -i 4.4.4.10"
3. Run UDP client on ib1 with same UDP port: "sockperf pp -i 4.4.4.10 -p 10000"

Expected output: ping-pong tests completes and prints latency results
Instead we see: UDP UC or MC: "no response from server"
Instead we see: TCP: "can't connect to server"

Original issue reported on code.google.com by rosenbau...@gmail.com on 24 Jan 2013 at 11:43

GoogleCodeExporter commented 9 years ago

Original comment by rosenbau...@gmail.com on 24 Jan 2013 at 12:51

GoogleCodeExporter commented 9 years ago
r195 | rosenbaumalex@gmail.com | 2013-01-29 10:21:56 +0200 (Tue, 29 Jan 2013) | 
13 lines
Changed paths:
   M /branches/sockperf_v2/src/Client.cpp

Support loopback connections - local network connection between server & client 
on same machine
Fixes: http://code.google.com/p/sockperf/issues/detail?id=40

Now bind() on client socket will happen only if sockperf flag '--client_port' 
is specified for all socket types TCP, UDP UC + MC.
Until now client used to bind(ADDRANY:server_port) only for UDP sockets.

(not changed)
-       Loopback is disabled in socket by default. Need to use 
'--mc-loopback-enable' to allow MC loopback traffic (both server + client)
-       Default for '--client_port' is 0, which means don't bind.
-       Only TCP (SOCK_STREAM) calls connect() to server

Original comment by rosenbau...@gmail.com on 29 Jan 2013 at 8:24