Skip to content

Commit

Permalink
[core] Added SRTO_LOSSMAXTTL to srt_getopt()
Browse files Browse the repository at this point in the history
  • Loading branch information
maxsharabayko authored and rndi committed Nov 4, 2019
1 parent 5f79089 commit 81f9299
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion docs/API.md
Expand Up @@ -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
Expand Down
5 changes: 5 additions & 0 deletions srtcore/core.cpp
Expand Up @@ -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);
Expand Down

0 comments on commit 81f9299

Please sign in to comment.