summaryrefslogtreecommitdiff
path: root/test/helpers.hpp
diff options
context:
space:
mode:
authorAshod Nakashian <ashod.nakashian@collabora.co.uk>2017-04-03 00:45:40 -0400
committerAshod Nakashian <ashnakash@gmail.com>2017-04-03 05:18:09 +0000
commit95d51493aa6f480948f07354f079e1b8d556108c (patch)
treecae28dba192074b74edeb33c86507eb4a477d3e9 /test/helpers.hpp
parentb52a8ac6e2806e3ebdc73726040eb70a908a40cc (diff)
wsd: remove nextmessage
This was a workaround to Poco's limitation of requiring socket receiveFrame be given preallocated buffer, which couldn't be exceeded by a larger payload. This meant the receiver had to know the maximum payload in advance. Since only the Kit uses Poco sockets, and the Kit never receives large payloads, this preamble is now obsolete. 100% (94/94) of old-style tests PASS. Change-Id: I76776f89497409e5755e335a3e25553e91cf0876 Reviewed-on: https://gerrit.libreoffice.org/36037 Reviewed-by: Ashod Nakashian <ashnakash@gmail.com> Tested-by: Ashod Nakashian <ashnakash@gmail.com>
Diffstat (limited to 'test/helpers.hpp')
-rw-r--r--test/helpers.hpp18
1 files changed, 1 insertions, 17 deletions
diff --git a/test/helpers.hpp b/test/helpers.hpp
index a950de9d9..ce6aef98d 100644
--- a/test/helpers.hpp
+++ b/test/helpers.hpp
@@ -222,7 +222,7 @@ std::vector<char> getResponseMessage(LOOLWebSocket& ws, const std::string& prefi
timedout = false;
}
- response.resize(READ_BUFFER_SIZE);
+ response.resize(READ_BUFFER_SIZE * 8);
int bytes = ws.receiveFrame(response.data(), response.size(), flags);
response.resize(std::max(bytes, 0));
std::cerr << name << "Got " << LOOLProtocol::getAbbreviatedFrameDump(response.data(), bytes, flags) << std::endl;
@@ -233,22 +233,6 @@ std::vector<char> getResponseMessage(LOOLWebSocket& ws, const std::string& prefi
{
return response;
}
- else if (LOOLProtocol::matchPrefix("nextmessage", message))
- {
- int size = 0;
- if (LOOLProtocol::getTokenIntegerFromMessage(message, "size", size) && size > 0)
- {
- response.resize(size);
- bytes = ws.receiveFrame(response.data(), response.size(), flags);
- response.resize(std::max(bytes, 0));
- std::cerr << name << "Got " << LOOLProtocol::getAbbreviatedFrameDump(response.data(), bytes, flags) << std::endl;
- if (bytes > 0 &&
- LOOLProtocol::matchPrefix(prefix, LOOLProtocol::getFirstLine(response)))
- {
- return response;
- }
- }
- }
}
else
{