Windows UDP server, per a client's use of -P, isn't causing the operating system to dispatch UDP events properly, per the full quintuple (after a connect()) and new subsequent traffic threads destined to the same port. Note: SO_REUSEADDR is set. Hence, the listener thread isn't causing parallel servers to get started even though the quintuple (per the connect()) should provide peer end uniqueness.
This works for other platforms. A connected traffic thread and a bound (via bind()) listener thread need to run in parallel and do so except with Windows.
More as described here.
netstat expected is the full quintuple, as shown with linux
Proto Recv-Q Send-Q Local Address Foreign Address (state)
udp4 0 0 10.211.55.2.5000 10.211.55.2.6666
udp4 0 0 *.5000 *.*
But get this with Windows
Proto Local Address Foreign Address State
UDP 0.0.0.0:5000 *:*
UDP 0.0.0.0:5000 *:*
For a connectionless socket (for example, type SOCK_DGRAM), the operation performed by WSAConnect is merely to establish a default destination address so that the socket can be used on subsequent connection-oriented send and receive operations (send, WSASend, recv, and WSARecv). Any datagrams received from an address other than the destination address specified will be discarded. If the entire name structure is all zeros (not just the address parameter of the name structure), then the socket will be disconnected. Then, the default remote address will be indeterminate, so send, WSASend, recv, and WSARecv calls will return the error code WSAENOTCONN. However, sendto, WSASendTo, recvfrom, and WSARecvFrom can still be used. The default destination can be changed by simply calling WSAConnect again, even if the socket is already connected. Any datagrams queued for receipt are discarded if name is different from the previous WSAConnect.
Diff:
Diff:
Diff:
Diff:
Diff:
Added support for multiple listeners using -p m-n, e.g iperf -s -p 6000-6007 and --incr-dstport on the client, e.g. iperf -c host -p 6000 --incr-dstport -P 8 or -p 6000-6007
Last edit: Robert McMahon 2021-02-28