Giter VIP home page Giter VIP logo

Comments (6)

ethouris avatar ethouris commented on June 1, 2024

(referring partially)
The timeout parameter is definitely in seconds. It's passed to the POSIX alarm() function (that's why this thing doesn't work on Windows) that makes it in result fire the SIGALRM signal in order to interrupt the sending. This timeout is just to make stransmit automatically exit when nothing is being sent.

I think the "connection timeout" is kinda mistake, or definitely unclear. It is not the time to wait for being connected to the other party, it is the time that it waits before it breaks connection AFTER it is successfully connected (if no data are being transmitted). Bears a better description, I admit.

If you are looking for a connection timeout, use the conntimeo option passed in SRT URI.

from srt.

ethouris avatar ethouris commented on June 1, 2024

The frequency of status report and bandwidth report is actually not even in any time units. It's in "times", that is, after how many packets transmitted the report should be printed. Effective frequency expressed in time will depend on the amount of sent data.

The Bandwidth (-b) is used the following way:

double expdur_ms = double(transfer_size)/conf_bw*1000;
auto expdur = milliseconds(size_t(expdur_ms));

So it looks for me as this Bandwidth is in B/s unit. It's the maximum sending speed that is allowed for stransmit - if it's exceeded (sending used less time than expected), stransmit will use the remaining time for sleeping.

from srt.

mrbloom avatar mrbloom commented on June 1, 2024

ethouris thanks for your answers.

May be timeouts can be separate issue.
Because if I plug out cable, admitted on the scheme with red cross for period longer then for 3-4 seconds, stransmit falls.

I set conntimeo to 8 or 8000

source
./stransmit -t:60 -b:7500000 -v udp://@239.10.10.3:1234?adapter=10.10.70.50 srt://10.85.10.22:5000?latency=8000&conntimeo=8
<< 1316 -> FAILURE
srt_sendmsg: [2001] Connection was broken.
SrtCommon: DESTROYING CONNECTION, closing sockets

destination
./stransmit -t:60 -s:1000 -r:1000 -v srt://:5000?conntimeo=8 udp://239.10.10.10:1234?conntimeo=8
<< 1316 -> FAILURE
recvmsg: [2001] Connection was broken.
SrtCommon: DESTROYING CONNECTION, closing sockets

default

I think when the buffer of destinations is empty on a half, stransmit needs reconnect .

As I read in Deployment Guide the maximum bandwith overhead is 50%, so if we have complete drop of channel, we can retransmit through overhead only 4 sec

May be I'm wrong.

from srt.

ethouris avatar ethouris commented on June 1, 2024

I'd have to verify a little bit more how this conntimeo actually works, however AFAIR this is only to hold the connecting process for that time in case that the other party doesn't respond. If your connection is broken, you'll get the connection broken report immediately, basing on the premise that there's no mutual communication (timeout for receiving ACK or KEEPALIVE). When the socket is closed, it goes even faster due to receiving the SHUTDOWN message from the closing party.

There's a possibility to introduce a new socket option, which will control the connection persistence timeout. Currently it's hardcoded for 5 seconds, although the checkTimers() function would have to be called at least 16 times since the last received packet from the opposite party.

from srt.

karlbrowns avatar karlbrowns commented on June 1, 2024

Can I just ask, in the first example given by mrbloom, he uses parameter ?latency=8000 in is SRT URI. Is this the correct syntax for specifying latency, and what units is it in?

from srt.

ethouris avatar ethouris commented on June 1, 2024

The unit is, AFAIR, milliseconds. And yes, this is the correct syntax - the paramters in the URI are translated into socket options that are set using srt_setsockopt (or srt_setsockflag). For example, latency parameter translates into SRTO_LATENCY option.

from srt.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.