diff options
author | Saúl Ibarra Corretgé <saghul@gmail.com> | 2014-09-25 21:38:03 +0200 |
---|---|---|
committer | Saúl Ibarra Corretgé <saghul@gmail.com> | 2014-09-25 21:38:03 +0200 |
commit | 5e822033b457618f0a3ca1c7fcc990f36d22822c (patch) | |
tree | ed098e524ca7dbada42afe6e23221db66670041d /docs/src | |
parent | 03e53f1cf76e9388e46fd66406b91ef598876986 (diff) | |
download | libuv-5e822033b457618f0a3ca1c7fcc990f36d22822c.tar.gz libuv-5e822033b457618f0a3ca1c7fcc990f36d22822c.zip |
doc: document uv_alloc_cb
Fixes #1498
Diffstat (limited to 'docs/src')
-rw-r--r-- | docs/src/handle.rst | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/docs/src/handle.rst b/docs/src/handle.rst index ae8efb70..4dcfc3dd 100644 --- a/docs/src/handle.rst +++ b/docs/src/handle.rst @@ -21,6 +21,15 @@ Data types Union of all handle types. +.. c:type:: void (*uv_alloc_cb)(uv_handle_t* handle, size_t suggested_size, uv_buf_t* buf) + + Type definition for callback passed to :c:func:`uv_read_start` and + :c:func:`uv_udp_recv_start`. The user must fill the supplied :c:type:`uv_buf_t` + structure with whatever size, as long as it's > 0. A suggested size (65536 at the moment) + is provided, but it doesn't need to be honored. Setting the buffer's length to 0 + will trigger a ``UV_ENOBUFS`` error in the :c:type:`uv_udp_recv_cb` or + :c:type:`uv_read_cb` callback. + .. c:type:: void (*uv_close_cb)(uv_handle_t* handle) Type definition for callback passed to :c:func:`uv_close`. |