Shorter waits to break the polling
loop when the test finishes and we
need to terminate.
Change-Id: I79d9d89675d0a37f25a03b265b3ae636a90e57d5
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
Messages are high-frequency events and logging
them at debug level is too noisy. Increase the
level to trace.
Debug level should produce legible entries that
outline the main activities, rather than log
each message. That is best done at trace level.
Change-Id: I722ab8b58e0adcab6ecb2f8c571966af0d952051
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
We now use our http::Socket and SocketPoll
instead of Poco.
Change-Id: I728f9c975b67da76dbbc78e94f1fb5f224c9bc57
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
Avoiding default values for parameters makes the code easier to read.
Especially true for bool parameters. But sure, just a question of
taste.
Change-Id: I473f70bdfafe3a9ccfb325def8760d78fee7e9a6
Signed-off-by: Tor Lillqvist <tml@collabora.com>
net/HttpRequest.cpp:126:19: error: declaration of 'end' shadows a member of 'this' [-Werror=shadow]
kit/Kit.cpp:163:29: error: missing initializer for member 'statfs::f_bsize' [-Werror=missing-field-initializers]
kit/Kit.cpp:171:14: error: 'OVERLAYFS_SUPER_MAGIC' was not declared in this scope
Signed-off-by: Miklos Vajna <vmiklos@collabora.com>
Change-Id: Ibbd35ab5af3adad403ed22a0aeb70917b9e21970
When writing to the socket, it's always more efficient
to fill the buffer up to the hardware limit for each
write. This is doubly important for efficiency with
SSL, due to the overhead of encrypting multiple
small buffers instead of one large one.
Currently we don't write more than one message
at a time, primarily due to limitations in
the Poco sockets in the unit-tests, which
have a hard time consuming multiple WS frames
with a single poll (subsequent calls to poll
doesn't enter signalled state until new data
arrives, possibly because the data is read and
buffered internally, making the whole scheme
of using poll unreliable and meaningless).
Change-Id: Ic2e2cf1babfb5ab4116efd93f392977ba234d92b
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
SocketPoll is captured as weak_ptr into
WebSocketSession and a much better shutdown
support is now available. The new logic
can do async-shutdown after flushing and
will do sync-shutdown if SocketPoll is
no longer around.
Change-Id: Ia206cab58a13f20f7aeb3a6d8c57afee731c8231
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
Useful for debugging, especially for unit-tests.
Change-Id: I820e584203a643a396d26c8817b9af1e750232c7
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
A utility class to create a WebSocket connection based
on WebSocketHandler, http::Request, and SocketPoll.
Change-Id: I00dfd6fc88e210860e0e378587ef1c0a0a65bb5c
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>