aboutsummaryrefslogtreecommitdiff
path: root/docs/src
diff options
context:
space:
mode:
Diffstat (limited to 'docs/src')
-rw-r--r--docs/src/udp.rst12
1 files changed, 10 insertions, 2 deletions
diff --git a/docs/src/udp.rst b/docs/src/udp.rst
index aed7ce22..706d011b 100644
--- a/docs/src/udp.rst
+++ b/docs/src/udp.rst
@@ -48,6 +48,12 @@ Data types
*/
UV_UDP_MMSG_CHUNK = 8,
/*
+ * Indicates that the buffer provided has been fully utilized by recvmmsg and
+ * that it should now be freed by the recv_cb callback. When this flag is set
+ * in uv_udp_recv_cb, nread will always be 0 and addr will always be NULL.
+ */
+ UV_UDP_MMSG_FREE = 16,
+ /*
* Indicates that recvmmsg should be used, if available.
*/
UV_UDP_RECVMMSG = 256
@@ -80,8 +86,10 @@ Data types
When using :man:`recvmmsg(2)`, chunks will have the `UV_UDP_MMSG_CHUNK` flag set,
those must not be freed. There will be a final callback with `nread` set to 0,
`addr` set to NULL and the buffer pointing at the initially allocated data with
- the `UV_UDP_MMSG_CHUNK` flag cleared. This is a good chance for the callee to
- free the provided buffer.
+ the `UV_UDP_MMSG_CHUNK` flag cleared and the `UV_UDP_MMSG_FREE` flag set.
+ The callee can now safely free the provided buffer.
+
+ .. versionchanged:: 1.39.0 added the `UV_UDP_MMSG_FREE` flag.
.. note::
The receive callback will be called with `nread` == 0 and `addr` == NULL when there is