libreoffice-online/wsd/TestStubs.cpp
Ashod Nakashian 3decba7eec wsd: specify the minimum bytes we can write to the socket
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>
2021-04-27 17:48:23 -04:00

38 lines
1.1 KiB
C++

/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
/*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
/*
* Stub missing symbols required for unit tests ...
*/
#include <config.h>
#include "DocumentBroker.hpp"
#include "ClientSession.hpp"
void DocumentBroker::assertCorrectThread() const {}
void ClientSession::traceTileBySend(const TileDesc& /*tile*/, bool /*deduplicated = false*/) {}
void ClientSession::enqueueSendMessage(const std::shared_ptr<Message>& /*data*/) {};
ClientSession::~ClientSession() = default;
void ClientSession::onDisconnect() {}
bool ClientSession::hasQueuedMessages() const { return false; }
void ClientSession::writeQueuedMessages(std::size_t) {}
void ClientSession::dumpState(std::ostream& /*os*/) {}
void ClientSession::setReadOnly(bool) {}
bool ClientSession::_handleInput(const char* /*buffer*/, int /*length*/) { return false; }
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */