Skip to content

Commit

Permalink
doc: document uv_alloc_cb
Browse files Browse the repository at this point in the history
  • Loading branch information
saghul committed Sep 25, 2014
1 parent 03e53f1 commit 5e82203
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions docs/src/handle.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
Expand Down

0 comments on commit 5e82203

Please sign in to comment.