doc: note buffer lifetime requirements in uv_write
Fixes: https://github.com/libuv/libuv/issues/1072 PR-URL: https://github.com/libuv/libuv/pull/1074 Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com> Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
This commit is contained in:
parent
8221f9b305
commit
1bcdca290d
@ -173,6 +173,10 @@ API
|
|||||||
uv_write(&req1, stream, a, 2, cb);
|
uv_write(&req1, stream, a, 2, cb);
|
||||||
uv_write(&req2, stream, b, 2, cb);
|
uv_write(&req2, stream, b, 2, cb);
|
||||||
|
|
||||||
|
.. note::
|
||||||
|
The memory pointed to by the buffers must remain valid until the callback gets called.
|
||||||
|
This also holds for :c:func:`uv_write2`.
|
||||||
|
|
||||||
.. c:function:: int uv_write2(uv_write_t* req, uv_stream_t* handle, const uv_buf_t bufs[], unsigned int nbufs, uv_stream_t* send_handle, uv_write_cb cb)
|
.. c:function:: int uv_write2(uv_write_t* req, uv_stream_t* handle, const uv_buf_t bufs[], unsigned int nbufs, uv_stream_t* send_handle, uv_write_cb cb)
|
||||||
|
|
||||||
Extended write function for sending handles over a pipe. The pipe must be
|
Extended write function for sending handles over a pipe. The pipe must be
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user