diff options
author | Ryan Liptak <squeek502@hotmail.com> | 2020-07-28 20:28:18 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-28 23:28:18 -0400 |
commit | 6b5aa669db4d57231e21b1ee97c63a06167e117e (patch) | |
tree | 62a91ee6f5fb7641fe0efef8c4b99e74074bb9d9 /docs/src | |
parent | 540d723fa43eb72e2097c78373124f108f17f327 (diff) | |
download | libuv-6b5aa669db4d57231e21b1ee97c63a06167e117e.tar.gz libuv-6b5aa669db4d57231e21b1ee97c63a06167e117e.zip |
udp: add uv_udp_using_recvmmsg query
Allows for determining if a buffer large enough for multiple dgrams
should be allocated in alloc_cb of uv_udp_recvstart, for example.
Contributes towards #2822.
PR-URL: https://github.com/libuv/libuv/pull/2830
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Jameson Nash <vtjnash@gmail.com>
Diffstat (limited to 'docs/src')
-rw-r--r-- | docs/src/udp.rst | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/docs/src/udp.rst b/docs/src/udp.rst index 6be20345..b24f2f1a 100644 --- a/docs/src/udp.rst +++ b/docs/src/udp.rst @@ -391,6 +391,16 @@ API .. versionchanged:: 1.37.0 :man:`recvmmsg(2)` support is no longer enabled implicitly, it must be explicitly requested by passing the `UV_UDP_RECVMMSG` flag to :c:func:`uv_udp_init_ex`. + .. versionchanged:: 1.39.0 :c:func:`uv_udp_using_recvmmsg` can be used in `alloc_cb` to + determine if a buffer sized for use with :man:`recvmmsg(2)` should be + allocated for the current handle/platform. + +.. c:function:: int uv_udp_using_recvmmsg(uv_udp_t* handle) + + Returns 1 if the UDP handle was created with the `UV_UDP_RECVMMSG` flag + and the platform supports :man:`recvmmsg(2)`, 0 otherwise. + + .. versionadded:: 1.39.0 .. c:function:: int uv_udp_recv_stop(uv_udp_t* handle) |