-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 06/30/2014 03:20 PM, Andrius Bentkus wrote:
> I guess we can add a uv_suggest_buffer_size(handle) which then
> invokes IOCTL(FIONREAD) on unix and does whatever windows
> supports.
>
> This is actually better because now the user can decide when he
> wants to do a system call like that(sys calls might be expensive).
>
Where do you want to add that? Ben tested that and it was too
expensive. AFAIK doing the FIONREAD would be useless if the socket is
not readable, and you don't know that because that's the whole point
of uv_read: "I want to read X data, give it to me when available".
Without thinking much about it, I'd say that it could be done with
another function, like uv_read, but taking a alloc_cb instead of a
list of buffers and a count:
UV_EXTERN int uv_bacon(uv_read_t* req,
uv_stream_t* handle,
uv_alloc_cb alloc_cb,
uv_read_cb read_cb);
- --
Saúl Ibarra Corretgé
bettercallsaghul.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
Comment: Using GnuPG with Icedove - http://www.enigmail.net/
iQIcBAEBAgAGBQJTsWWeAAoJEEEOVVOum8BZ9YIP/1a85fFV5WwmuqwmGIiD32Ho
FD54kCEONWUDz+KxqyuWNJJcW5kRXZruXRoPdq/wqU3yiZL65FuhCNabUeEcrl3s
ElJ+VShtT6/mDbZKWlm4g7Hl5NUo6H6FmfExFfbLZtpyZetBkjzj26gKXMSIP1cZ
6z+op1mpseYeaISUlHVBOduspqNUItc8sYy4ik6egNbRrfAH9OLskn0s0ld7X2Ts
7G3WphlJjyk+BNOn/EaK9YS0FuTcpveQFQIrikhG1C/Rb4quib1VZ53zPIbzqVsQ
9zQXGXPXu8Zh0aCH6QMviIZ815kO0QVwyOfVmgyWb5p0AS4liRUQwzdcFZ0H0HR8
0CylIQELJIqXUyLDHQXK/d5L2R7a8O/zH4r+SrsaIeF758s9oeNxSG6dNKHX+mYv
4+IxsP83LrqVbjpKAqCYar3lFBdWKQvGqDoh7vUi+Yet8v6zvUwi2Nqd7ZFpenzN
Tl2FJiUieRNaXmeMxKezigZluLzB0iRM/gVtbpSJQMJEwz360KY0KOMT2BWzWqb1
IbZJXN92Ibs3mUYqW28oMXQ78mokrvjkGCkSmM0+e0mrptA4+60yIu5LObdJqI0h
wcnNHyl7m7r7EOoEA4rGEcUkjAF5etoKUy3sGNHMDq0hj4gU76LVyh0Onl+kuv0o
NADOxA1AXoQ/q7AW1A4F
=sOG4
-----END PGP SIGNATURE-----
--
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.