From 81f929986329cf6540861b109752bbc42e6b2306 Mon Sep 17 00:00:00 2001 From: Maxim Sharabayko Date: Tue, 29 Oct 2019 14:49:43 +0100 Subject: [PATCH] [core] Added SRTO_LOSSMAXTTL to srt_getopt() --- docs/API.md | 2 +- srtcore/core.cpp | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/docs/API.md b/docs/API.md index ff0671367..34992e1a1 100644 --- a/docs/API.md +++ b/docs/API.md @@ -659,7 +659,7 @@ the bidirectional stream sending in version 1.2.0is not supported. | ------------------ | ----- | ------- | ----- | ------- | -------- | ---------- | | `SRTO_LOSSMAXTTL` | 1.2.0 | pre | `int` | packets | 0 | reasonable | -- **[SET]** - The value up to which the *Reorder Tolerance* may grow. When +- **[GET or SET]** - The value up to which the *Reorder Tolerance* may grow. When *Reorder Tolerance* is > 0, then packet loss report is delayed until that number of packets come in. *Reorder Tolerance* increases every time a "belated" packet has come, but it wasn't due to retransmission (that is, when UDP packets tend to diff --git a/srtcore/core.cpp b/srtcore/core.cpp index 09aa912cc..c25905fa6 100644 --- a/srtcore/core.cpp +++ b/srtcore/core.cpp @@ -1157,6 +1157,11 @@ void CUDT::getOpt(SRT_SOCKOPT optName, void *optval, int &optlen) optlen = sizeof(int32_t); break; + case SRTO_LOSSMAXTTL: + *(int32_t*)optval = m_iMaxReorderTolerance; + optlen = sizeof(int32_t); + break; + case SRTO_NAKREPORT: *(bool *)optval = m_bRcvNakReport; optlen = sizeof(bool);