You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to enable the perMessageDeflate option on my Node.js Socket.IO server to compress messages and reduce bandwidth usage. However, it seems the C# client does not support or acknowledge the compression, while the JavaScript client handles the compressed messages without any problems.
Thanks,
The text was updated successfully, but these errors were encountered:
You can try SocketIOOptions.ExtraHeaders,I think it can be like this : ExtraHeaders.add("Sec-WebSocket-Extensions","permessage-deflate; client_max_window_bits")
Permessage-deflate is not managed by Socket.IO but is a feature of WebSocket clients.
The default WebSocket client used by the library (Net Standard ClientWebSocket) does not support the permessage-deflate option.
A possible solution is to implement the IClientWebSocket interface and use a different WebSocket client.
Thank you for your suggestion, but unfortunately, it didn’t work. This seems to be expected behavior, as adding the header signals to the server that we can receive compressed data, even though the default WebSocket cannot decompress it. Without the header, the server assumes we cannot decompress and sends uncompressed data, even if data compression is enabled.
Hi,
I want to enable the
perMessageDeflate
option on my Node.js Socket.IO server to compress messages and reduce bandwidth usage. However, it seems the C# client does not support or acknowledge the compression, while the JavaScript client handles the compressed messages without any problems.Thanks,
The text was updated successfully, but these errors were encountered: