Support parallel UDP streams under Windows and Cygwin #1163
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Version of iperf3 (or development branch, such as
master
or3.1-STABLE
) to which this pull request applies:3.10
Issues fixed (if any):
iperf3 UDP test functionality depends on SO_REUSEADDR implementation #472 / iperf3 -c 127.0.0.1 -i1 -t 9999 -b50M -u -p5003 -d -P2 -V failed #1161
Brief description of code changes (suitable for use as a commit message):
Suggested change to allow UDP parallel streams under Windows (and Cygwin). The change is based on the approach suggested by @rossro, as described in this #472 comment.
The change adds an option to the Windows Server's
-p
parameter that defines the number of ports available starting with the defined port :-p <port>/[<num of ports]
E.g
-p 5201/2
specifies that ports 5201 and 5202 can be used for the UDP streams.UPDATE (16-Apr-2023):
Updated to be fully backward compatible, including between Windows and other OS (including rebase to 3.13). This is by adding a
UDP_CONNECT_REPLY_NEXT_PORT
from a Windows server, to indicate that a different port should be used for the next UDP stream. The only combination that does not work is a Windows Server with older client version when multi UDP streams are used. However, this did not work anyway (just the error condition is changed).