diff options
author | Ashod Nakashian <ashod.nakashian@collabora.co.uk> | 2022-12-19 07:07:17 -0500 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2022-12-31 13:33:27 +0100 |
commit | 3958a614edb66f7fdfd4485d505439e8473967f3 (patch) | |
tree | 2b001f79ed210ce8326bd1dc049f1f3196f5a8b5 | |
parent | wsd: do not warn of expected DocBroker disconnection (diff) | |
download | online-3958a614edb66f7fdfd4485d505439e8473967f3.tar.gz online-3958a614edb66f7fdfd4485d505439e8473967f3.zip |
wsd: support flushing control in WSProcess::sendFrame
Change-Id: Iba1b3869a5c0aa816f78bdf59347b6e9408e8f97
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
-rw-r--r-- | wsd/COOLWSD.hpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/wsd/COOLWSD.hpp b/wsd/COOLWSD.hpp index 5474b734f2..f003de2296 100644 --- a/wsd/COOLWSD.hpp +++ b/wsd/COOLWSD.hpp @@ -137,20 +137,22 @@ public: pid_t getPid() const { return _pid; } /// Send a text payload to the child-process WS. - bool sendTextFrame(const std::string& data) + bool sendTextFrame(const std::string& data, bool flush = false) { - return sendFrame(data, false); + return sendFrame(data, false, flush); } /// Send a payload to the child-process WS. - bool sendFrame(const std::string& data, bool binary = false) + bool sendFrame(const std::string& data, bool binary = false, bool flush = false) { try { if (_ws) { - LOG_TRC("Send to " << _name << " message: [" << COOLProtocol::getAbbreviatedMessage(data) << "]."); - _ws->sendMessage(data.c_str(), data.size(), (binary ? WSOpCode::Binary : WSOpCode::Text), false); + LOG_TRC("Send to " << _name << " message: [" + << COOLProtocol::getAbbreviatedMessage(data) << ']'); + _ws->sendMessage(data.c_str(), data.size(), + (binary ? WSOpCode::Binary : WSOpCode::Text), flush); return true; } } |