Closed prawnsalad closed 4 months ago
Post the gws server configuration
gws.NewUpgrader(wsHandlers, &gws.ServerOption{
ReadAsyncEnabled: true, // Parallel message processing
CompressEnabled: true, // Enable compression
Recovery: gws.Recovery, // Exception recovery
ReadMaxPayloadSize: 1024,
Logger: lt{},
})
The content is compressed
Ahh of course.. that makes sense! So ReadMaxPayloadSize
is the protocol level max payload size. Now it makes sense and everything is good. Thank you!
I'm trying to verify the
ReadMaxPayloadSize
config option but i can't quite make sense of it.In
readMessage()
if I addprint("contentLength = ", contentLength, " continuation? ", opcode == OpcodeContinuation, "\n")
and then use this test script in Chrome:I would expect
contentLength
to be 1024. However, it printscontentLength = 11 continuation? false
. Is there some unit mismatch or is it reading the contentLength incorrectly?