Message type (TEXT or BINARY) is invalid for received fragmented messages (fix autobahn test: 5.3 through 5.8 Fragmentation)

This commit is contained in:
Benjamin Sergeant
2019-09-03 09:13:38 -07:00
parent e1ad0b0889
commit ab93e4f168
5 changed files with 23 additions and 10 deletions

View File

@ -151,6 +151,11 @@ namespace ix
// size increased 2 fold, while appending to a list has a fixed cost.
std::list<std::vector<uint8_t>> _chunks;
// Record the message kind (will be TEXT or BINARY) for a fragmented
// message, present in the first chunk, since the final chunk will be a
// CONTINUATION opcode and doesn't tell the full message kind
MessageKind _fragmentedMessageKind;
// Fragments are 32K long
static constexpr size_t kChunkSize = 1 << 15;