Multiple client connections (receive, generate) #37
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.
Two new CLI options are added to
receive
andgenerate
subcommand.--maxconns
: specifies the maximum number of connections to initiate or accept (-1: infinite, default: 1).--concurrent-streams
: specifies the maximum number of concurrent streams (default: 1)..In the case of SRT caller,
maxconns
connections will be initiated by default from a different source UDP port to the same remote UDP port.srt-xtransmit generate srt://127.0.0.1:4200?bind=:5200 --sendrate 5Mbps --duration 5s --reconnect --concurrent-streams 2 --maxconns 2 srt-xtransmit receive srt://:4200 -v --reconnect --concurrent-streams 2 --maxconns 2
To initiate connections from the same port bind to that port explicitly.
srt-xtransmit generate srt://127.0.0.1:4200?bind=:5200 --sendrate 5Mbps --duration 5s --reconnect --concurrent-streams 2 --maxconns 2
In the case of SRT listener up to
n
incoming connection requests will be accepted.Each SRT connection creates a separate thread for a processing loop.
There is no way to specify different remotes yet, mainly due to the potential collision of the CLI syntax with the SRT socket group syntax.
Example Usage
Call from Different UDP Ports
Sender/caller (
generate
), receiver/listener (receive
).Call from the Same UDP Port
Sender/listener (
generate
), receiver/caller (receive
).TODO
Does not work properly with the
--reconnect
option. Client must tell the number of simultaneous connections, i.e. wait for it to finish before reconnecting.Move metrics thread to be shared between pipes.