Per message deflate/compression: handle fragmented messages (fix autobahn test: 12.1.X and probably others)

This commit is contained in:
Benjamin Sergeant
2019-09-03 17:42:48 -07:00
parent da3d134be0
commit 0bf185e143
5 changed files with 24 additions and 10 deletions

View File

@ -156,6 +156,9 @@ namespace ix
// CONTINUATION opcode and doesn't tell the full message kind
MessageKind _fragmentedMessageKind;
// Ditto for whether a message is compressed
bool _compressedMessage;
// Fragments are 32K long
static constexpr size_t kChunkSize = 1 << 15;
@ -244,7 +247,7 @@ namespace ix
void emitMessage(MessageKind messageKind,
const std::string& message,
const wsheader_type& ws,
bool compressedMessage,
const OnMessageCallback& onMessageCallback);
bool isSendBufferEmpty() const;