Commit graph

4 commits

Author SHA1 Message Date
Miklos Vajna
721003512e IoUtil: avoid multiplying at int precision, then comparing to long
Here:

if (payload.capacity() > READ_BUFFER_SIZE * 4)

Change-Id: I12e090d03b471b7394a4898d5e1a74992182051e
2016-12-01 18:15:58 +01:00
Jan Holesovsky
e15ec1d33b These constants are not needed any more.
Change-Id: I5e73d4eacdf5e88f11bc3755162fe601a65417fe
2016-11-28 11:33:20 +01:00
Ashod Nakashian
6ab32e0aa9 loolwsd: use larger threshold to large messages
Messages larger than a certain size are preambled
with a 'nextmessage' message that hold the size
of the subsequent message.

This is a workaround to a limitation the Poco
WebSocket API where if the buffer size is
smaller than the received frame the socket
ends up in a bad state and must be closed.
Unfortunately the new API that avoids this
workaround is not yet released by Poco.

Here we minimize the need for 'nextmessage'
to truely large messages. The limit is now
raised from above 1KB to over 63KB.

We may raise this limit further, but that will
cost each socket that much dedicated buffer size.

Change-Id: I01e4c68cdbe67e413c04a9725152224a87ab8267
Reviewed-on: https://gerrit.libreoffice.org/31286
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-11-28 04:54:37 +00:00
Michael Meeks
cca657c8f2 Apply the pre-branch rename script to re-organize the source. 2016-11-25 09:58:48 +00:00
Renamed from loolwsd/Common.hpp (Browse further)