Hello!

This is a good question indeed!

In node.js we just slice that data right into bufs and increments the
`bufs` pointer itself until the proper offset is reached.

Here is a relevant section:

https://github.com/joyent/node/blob/master/src/stream_wrap.cc#L616-L628

Cheers!

On Mon, Sep 8, 2014 at 9:41 PM, Iñaki Baz Castillo <[email protected]> wrote:

> Hi,
>
>   int uv_try_write(uv_stream_t* handle,
>                            const uv_buf_t bufs[],
>                            unsigned int nbufs);
>
> Let's suppose I provide the call with 2 buffers so nbufs is 2. The
> first one has 100 bytes and the second one has 50 bytes.
>
> Then the function return 75, or 125. How am I supposed to react on
> that in order to attempt to use uv_write()?
>
> --
> Iñaki Baz Castillo
> <[email protected]>
>
> --
> You received this message because you are subscribed to the Google Groups
> "libuv" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/libuv.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"libuv" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/libuv.
For more options, visit https://groups.google.com/d/optout.

Reply via email to