aboutsummaryrefslogtreecommitdiff
path: root/docs/src
diff options
context:
space:
mode:
authorBen Noordhuis <info@bnoordhuis.nl>2024-03-25 12:44:52 +0100
committerGitHub <noreply@github.com>2024-03-25 12:44:52 +0100
commitd05ed869bb4cea9ba703854dc0ee1f458153ff99 (patch)
tree436beafe8db8c0b49806fbc256058905b152b7fd /docs/src
parentabc9767034d7c065e6a861cc398a580d0f94e24f (diff)
downloadlibuv-d05ed869bb4cea9ba703854dc0ee1f458153ff99.tar.gz
libuv-d05ed869bb4cea9ba703854dc0ee1f458153ff99.zip
doc: correct udp socket options documentation (#4371)
uv_udp_init() creates the UDP socket lazily but to set socket options there must be, well, a socket to set the options on. Document how and when that requirement is met. Fixes: https://github.com/libuv/libuv/issues/4370
Diffstat (limited to 'docs/src')
-rw-r--r--docs/src/udp.rst20
1 files changed, 15 insertions, 5 deletions
diff --git a/docs/src/udp.rst b/docs/src/udp.rst
index d7da95ed..9e075d7b 100644
--- a/docs/src/udp.rst
+++ b/docs/src/udp.rst
@@ -285,7 +285,9 @@ API
local sockets.
:param handle: UDP handle. Should have been initialized with
- :c:func:`uv_udp_init`.
+ :c:func:`uv_udp_init_ex` as either ``AF_INET`` or ``AF_INET6``, or have
+ been bound to an address explicitly with :c:func:`uv_udp_bind`, or
+ implicitly with :c:func:`uv_udp_send()` or :c:func:`uv_udp_recv_start`.
:param on: 1 for on, 0 for off.
@@ -296,7 +298,9 @@ API
Set the multicast ttl.
:param handle: UDP handle. Should have been initialized with
- :c:func:`uv_udp_init`.
+ :c:func:`uv_udp_init_ex` as either ``AF_INET`` or ``AF_INET6``, or have
+ been bound to an address explicitly with :c:func:`uv_udp_bind`, or
+ implicitly with :c:func:`uv_udp_send()` or :c:func:`uv_udp_recv_start`.
:param ttl: 1 through 255.
@@ -307,7 +311,9 @@ API
Set the multicast interface to send or receive data on.
:param handle: UDP handle. Should have been initialized with
- :c:func:`uv_udp_init`.
+ :c:func:`uv_udp_init_ex` as either ``AF_INET`` or ``AF_INET6``, or have
+ been bound to an address explicitly with :c:func:`uv_udp_bind`, or
+ implicitly with :c:func:`uv_udp_send()` or :c:func:`uv_udp_recv_start`.
:param interface_addr: interface address.
@@ -318,7 +324,9 @@ API
Set broadcast on or off.
:param handle: UDP handle. Should have been initialized with
- :c:func:`uv_udp_init`.
+ :c:func:`uv_udp_init_ex` as either ``AF_INET`` or ``AF_INET6``, or have
+ been bound to an address explicitly with :c:func:`uv_udp_bind`, or
+ implicitly with :c:func:`uv_udp_send()` or :c:func:`uv_udp_recv_start`.
:param on: 1 for on, 0 for off.
@@ -329,7 +337,9 @@ API
Set the time to live.
:param handle: UDP handle. Should have been initialized with
- :c:func:`uv_udp_init`.
+ :c:func:`uv_udp_init_ex` as either ``AF_INET`` or ``AF_INET6``, or have
+ been bound to an address explicitly with :c:func:`uv_udp_bind`, or
+ implicitly with :c:func:`uv_udp_send()` or :c:func:`uv_udp_recv_start`.
:param ttl: 1 through 255.