Skip to content

Commit 5e82203

Browse files
committed
doc: document uv_alloc_cb
Fixes #1498
1 parent 03e53f1 commit 5e82203

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

docs/src/handle.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,15 @@ Data types
2121
2222
Union of all handle types.
2323

24+
.. c:type:: void (*uv_alloc_cb)(uv_handle_t* handle, size_t suggested_size, uv_buf_t* buf)
25+
26+
Type definition for callback passed to :c:func:`uv_read_start` and
27+
:c:func:`uv_udp_recv_start`. The user must fill the supplied :c:type:`uv_buf_t`
28+
structure with whatever size, as long as it's > 0. A suggested size (65536 at the moment)
29+
is provided, but it doesn't need to be honored. Setting the buffer's length to 0
30+
will trigger a ``UV_ENOBUFS`` error in the :c:type:`uv_udp_recv_cb` or
31+
:c:type:`uv_read_cb` callback.
32+
2433
.. c:type:: void (*uv_close_cb)(uv_handle_t* handle)
2534
2635
Type definition for callback passed to :c:func:`uv_close`.

0 commit comments

Comments
 (0)