SOL_SNDBUF set to protocol rx size

This tells the OS to reserve a TX buffer at least the size of the biggest RX frame
expected, for both server and client connections.

In Linux, the OS reserves 2 x the requested amount.

This is aimed at reducing the partial large atomic frame send problem to the point
it's only coming at large atomic frames the OS balks at reserving the size for.

If you have a lot of data to send, it is better to split it into multiple writes,
and use the FIN / CONTINUATION websocket stuff to manage it.

See the "fraggle" test app for example code of how to do that.

Signed-off-by: Andy Green <andy.green@linaro.org>
2 files changed