libreoffice-online/net
Ashod Nakashian 31dd434136 nb: drain the read buffer before dispatching
Draining the buffer is the correct appraoch
to avoid accumulating data in the kernel
unnecessarily. But it also reduces the overhead
of reparsing the incoming data for message
boundaries.

The client that is to parse the data should
parse as many messages as possible and remove
them from the socket buffer.

Finally, we probably need to cap the maximum
buffer size to avoid bloating. However this
heavily depends on the application's max
message size, assuming there is no separate
buffer beyond that of the socket to accumulate
the messages in.

Change-Id: I49c4eccebd474cd07ca84f3f4eae33bc717ed1f2
Reviewed-on: https://gerrit.libreoffice.org/34411
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2017-03-10 10:47:37 +01:00
..
clientnb.cpp nb: cosmetics 2017-03-10 10:47:37 +01:00
loolnb.cpp nb: enable HTTPS in server 2017-03-10 10:47:37 +01:00
socket.hpp nb: drain the read buffer before dispatching 2017-03-10 10:47:37 +01:00
ssl.cpp nb: Enable partial writes and no retry 2017-03-10 10:47:37 +01:00
ssl.hpp nb: initialize the SSL Context 2017-03-10 10:47:37 +01:00