Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: stevomatthews <[email protected]>
  • Loading branch information
ethouris and stevomatthews authored Aug 7, 2023
1 parent 899eede commit 6844a54
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 12 deletions.
17 changes: 8 additions & 9 deletions docs/API/API-socket-options.md
Original file line number Diff line number Diff line change
Expand Up @@ -650,15 +650,14 @@ only when the socket is going to be bound to the IPv6 wildcard address `in6addr_
(known also as `::`). If you bind to a wildcard address, you have the following
possibilities:

* IPv4 only: bind to an IPv4 wildcard
* IPv6 only: bind to an IPv6 wildcard and set this option to 1
* IPv4 and IPv6: bind to an IPv6 wildcard and set this option to 0

This option's default value is -1 because it is not possible to determine from
upside the default value on the current platform any portable way, and if you
bind to an IPv6 wildcard, this value is required prior to binding. In case when
you bind implicitly when calling `srt_connect` on the socket, this isn't a
problem - binding will be done using the system-default value and then
* IPv4 only: bind to an IPv4 wildcard address
* IPv6 only: bind to an IPv6 wildcard address and set this option to 1
* IPv4 and IPv6: bind to an IPv6 wildcard address and set this option to 0

This option's default value is -1 because it is not possible to determine the default
value on the current platform, and if you bind to an IPv6 wildcard address, this value
is required prior to binding. When you bind implicitly by calling `srt_connect` on the
socket, this isn't a problem -- binding will be done using the system-default value and then
extracted afterwards. But if you want to bind explicitly using `srt_bind`, this
option must be set explicitly to 0 or 1 because this information is vital for
determining any potential bind conflicts with other sockets.
Expand Down
6 changes: 3 additions & 3 deletions docs/apps/srt-live-transmit.md
Original file line number Diff line number Diff line change
Expand Up @@ -285,10 +285,10 @@ specify the host as `::`.
NOTE: Don't use square brackets syntax in the **adapter** parameter
specification, as in this case only the host is expected.

3. If you bind to an IPv6 wildcard (with listener mode or when using the `bind`
3. If you bind to an IPv6 wildcard address (with listener mode, or when using the `bind`
option), setting the `ipv6only` option to 0 or 1 is obligatory, as it is a part
of the binding definition. If you set it to 1, the binding will concern only
IPv6 local addresses, and if you set it to 0, it will concern both IPv4 and
of the binding definition. If you set it to 1, the binding will apply only to
IPv6 local addresses, and if you set it to 0, it will apply to both IPv4 and
IPv6 local addresses. See the
[`SRTO_IPV6ONLY`](../API/API-socket-options.md#SRTO_IPV6ONLY) option
description for details.
Expand Down

0 comments on commit 6844a54

Please sign in to comment.