MCPcopy Create free account
hub / github.com/Pagghiu/SaneCppLibraries / onReaderFrameHeader

Method onReaderFrameHeader

Libraries/Http/HttpWebSocket.cpp:1164–1180  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1162 if (ignoringFrame)
1163 {
1164 return Result(true);
1165 }
1166
1167 if (header.opcode == HttpWebSocketOpcode::Continuation)
1168 {
1169 SC_TRY_MSG(assemblingMessage, "HttpWebSocketMessageAssembler unexpected continuation");
1170 }
1171 else
1172 {
1173 SC_TRY_MSG(not assemblingMessage, "HttpWebSocketMessageAssembler new message before final continuation");
1174 messageOpcode = header.opcode;
1175 messageSize = 0;
1176 assemblingMessage = true;
1177 }
1178
1179 if (header.payloadLength == 0 and header.fin)
1180 {
1181 if (onMessage.isValid())
1182 {
1183 SC_TRY(onMessage(messageOpcode, {messageStorage.data(), messageSize}));

Callers

nothing calls this directly

Calls 3

isControlFrameMethod · 0.80
ResultClass · 0.50
isValidMethod · 0.45

Tested by

no test coverage detected