Skip to content

Commit

Permalink
[core] SRTO_RETRANSMITALGO becomes readable (#1615)
Browse files Browse the repository at this point in the history
  • Loading branch information
maxsharabayko authored Oct 23, 2020
1 parent bda3383 commit 929b9fc
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 deletions.
17 changes: 9 additions & 8 deletions docs/APISocketOptions.md
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ The following table lists SRT socket options in alphabetical order. Option detai
| [`SRTO_RCVSYN`](#SRTO_RCVSYN) | | post | `bool` | | true | | RW | GSI |
| [`SRTO_RCVTIMEO`](#SRTO_RCVTIMEO) | | post | `int32_t` | ms | -1 | -1, 0.. | RW | GSI |
| [`SRTO_RENDEZVOUS`](#SRTO_RENDEZVOUS) | | pre | `bool` | | false | | RW | S |
| [`SRTO_RETRANSMITALGO`](#SRTO_RETRANSMITALGO) | 1.4.2 | pre | `int32_t` | | 0 | [0, 1] | W | GSD |
| [`SRTO_RETRANSMITALGO`](#SRTO_RETRANSMITALGO) | 1.4.2 | pre | `int32_t` | | 0 | [0, 1] | RW | GSD |
| [`SRTO_REUSEADDR`](#SRTO_REUSEADDR) | | pre | `bool` | | true | | RW | GSD |
| [`SRTO_SENDER`](#SRTO_SENDER) | 1.0.4 | pre | `bool` | | false | | W | S |
| [`SRTO_SNDBUF`](#SRTO_SNDBUF) | | pre | `int32_t` | bytes | 8192 payloads | * | RW | GSD+ |
Expand Down Expand Up @@ -1208,20 +1208,22 @@ procedure of `srt_bind` and then `srt_connect` (or `srt_rendezvous`) to one anot

| OptName | Since | Binding | Type | Units | Default | Range | Dir | Entity |
| --------------------- | ----- | ------- | --------- | ------ | ------- | ------ | --- | ------ |
| `SRTO_RETRANSMITALGO` | 1.4.2 | pre | `int32_t` | | 0 | [0, 1] | W | GSD |
| `SRTO_RETRANSMITALGO` | 1.4.2 | pre | `int32_t` | | 0 | [0, 1] | RW | GSD |

- Retransmission algorithm to use (SENDER option):
- 0 - Default (retransmit on every loss report).
- 1 - Reduced retransmissions (not more often than once per RTT); reduced
- 0 - Default (retransmit on every loss report).
- 1 - Reduced retransmissions (not more often than once per RTT); reduced
bandwidth consumption.

- This option is effective only on the sending side. It influences the decision
as to whether particular reported lost packets should be retransmitted at a
- This option is effective only on the sending side. It influences the decision
as to whether a particular reported lost packet should be retransmitted at a
certain time or not.

- The reduced retransmission algorithm (`SRTO_RETRANSMITALGO=1`) is only operational when receiver sends
Periodic NAK reports. See [SRTO_NAKREPORT](#SRTO_NAKREPORT).

[Return to list](#list-of-options)

[Return to list](#list-of-options)


#### SRTO_REUSEADDR
Expand Down Expand Up @@ -1520,4 +1522,3 @@ For example, version 1.4.2 is encoded as `0x010402`.

[Return to list](#list-of-options)


5 changes: 5 additions & 0 deletions srtcore/core.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1309,6 +1309,11 @@ void CUDT::getOpt(SRT_SOCKOPT optName, void *optval, int &optlen)
optlen = m_OPT_PktFilterConfigString.size();
break;

case SRTO_RETRANSMITALGO:
*(int32_t *)optval = m_iOPT_RetransmitAlgo;
optlen = sizeof(int32_t);
break;

default:
throw CUDTException(MJ_NOTSUP, MN_NONE, 0);
}
Expand Down

0 comments on commit 929b9fc

Please sign in to comment.