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

Method writePayload

Libraries/Http/HttpWebSocket.cpp:909–923  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

907 state = State::ExtendedLength;
908 }
909 break;
910 }
911
912 case State::ExtendedLength:
913 SC_TRY_MSG(not(extendedLengthBytesExpected == 8 and extendedLengthBytesRead == 0 and (current & 0x80) != 0),
914 "HttpWebSocketFrameReader invalid 64-bit payload length");
915 extendedLengthAccumulator = (extendedLengthAccumulator << 8) | current;
916 extendedLengthBytesRead++;
917 consumedBytes++;
918 if (extendedLengthBytesRead == extendedLengthBytesExpected)
919 {
920 currentFrame.payloadLength = extendedLengthAccumulator;
921 if (currentFrame.masked)
922 {
923 state = State::MaskKey;
924 }
925 else
926 {

Callers 4

encodeFrameFunction · 0.80
writerRoundtripMethod · 0.80
sendFrameMethod · 0.80
queueAutomaticControlMethod · 0.80

Calls 3

scHttpWebSocketApplyMaskFunction · 0.85
ResultClass · 0.50
sizeInBytesMethod · 0.45

Tested by 2

encodeFrameFunction · 0.64
writerRoundtripMethod · 0.64