Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

srt-live-transmit: add option to cancel timeout #570

Merged
merged 4 commits into from
Mar 11, 2019
Merged

Conversation

zmousm
Copy link
Contributor

@zmousm zmousm commented Feb 13, 2019

Add an option (-taoc, -timeout-abort-on-connect) to cancel the timeout (as set with -t) after a client is accepted. This allows for srt-live-transmit to run in listener mode and wait for a limited amount of time (timeout) for a client to connect.

Due to the paired tx/rx operation of srt-live-transmit and the fact that a sender process may not accept multiple clients, should one want to operate such a server they would need to devise a way to spawn sender processes as necessary. In such a case sender processes spawned in listener mode wait for the client to connect; it then becomes important to enforce a timeout so the sender process does not wait forever. You already have the timeout option for srt-live-transmit, but that works as an unconditional exit timer. This patch introduces a second option, which changes the behavior of timeout: once a client is accepted the pending alarm(2) is canceled.

This is probably an abuse of the timeout option, but it seems to be the only way to achieve a listener timeout. The timeout (SRTO_RCVTIMEO, SRTO_SNDTIMEO) and conntimeo parameters do not seem to have any effect at the particular stage.

@zmousm
Copy link
Contributor Author

zmousm commented Feb 13, 2019

[...] should one want to operate such a server they would need to devise a way to spawn sender processes as necessary

I wrote a CGI script as a simple implementation for that.

Add an option (-taoc, -timeout-abort-on-connect) to cancel the timeout
(as set with -t) after a client is accepted. This allows for
srt-live-transmit to run in listener mode and wait for a limited
amount of time (timeout) for a client to connect.
@maxsharabayko maxsharabayko added this to the v.1.3.3 milestone Mar 1, 2019
@maxsharabayko maxsharabayko added the [apps] Area: Test applications related improvements label Mar 1, 2019
@rndi rndi merged commit 08e7a36 into Haivision:master Mar 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[apps] Area: Test applications related improvements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants