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

[core] SRTO_RETRANSMITALGO becomes readable #1615

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 9 additions & 7 deletions docs/APISocketOptions.md
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,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 bufs | * | RW | GSD+ |
Expand Down Expand Up @@ -1194,20 +1194,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 packets should be retransmitted at a
maxsharabayko marked this conversation as resolved.
Show resolved Hide resolved
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
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