add uv_send/recv_buffer_size

This will let the user inspect the buffer sizes of the socks and adjust their sizes.

This is useful if you have high volume traffic applications, since you can adjust the buffer to be much bigger and let the app therefore make less receives or writes(which are costly operations, since you cross from userspace to kernelspace). 

Goes hand in hand with try_write and try_send.

I'm going to add the windows code later today.
I didn't feel a strong opposition from Ben ;-) I'm on with the current
approach, 4 functions sounds a bit too much.
On Jul 19, 2014 1:18 PM, "Andrius Bentkus" <notifications@github.com> wrote:

> In include/uv.h:
>
> > + * Returns or sets the size of the receive buffer that the operating
> > + * system uses for the socket.
> > + *
> > + * If *value == 0, it will return the current receive buffer size,
> > + * otherwise it will use *value to set the new receive buffer size.
> > + */
> > +UV_EXTERN int uv_recv_buffer_size(uv_handle_t* handle, int* value);
> > +
> > +/*
> > + * Returns or sets the size of the send buffer that the operating
> > + * system uses for the socket.
> > + *
> > + * If *value == 0, it will return the current send buffer size,
> > + * otherwise it will use *value to set the new send buffer size.
> > + */
> > +UV_EXTERN int uv_send_buffer_size(uv_handle_t* handle, int* value);
>
> We are already multiplexing buffer_size on recv and send, do we really
> want to multiplex on set get as well?
>
> That would be 4 functions.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/joyent/libuv/pull/1363/files#r15143199>.
>