sta / sta/websocket-sharp

Per-message Compression not working with uWebsocket backend

Open
#580 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C#
Stars
6.1k
Forks
1.7k
PR merge metrics
No merged PRs in 30d

Description

Hi, I'm using Websocket-sharp in my Unity game as client that is connecting to a uWebsocket backend server.
We want to enable Per-message Compression for this connection but the problem is that when I enable compression in client with following line before connect:

ws.Compression = CompressionMethod.Deflate;

the server refuses the request from the client for connection.
We also reproduced this issue with ws library in node js as backend with its provided example configuration, but the problem persists. When we set serverMaxWindowBits in ws library to default negotiated value, the client can connect to the server properly.

Now my question is, Is there any way that we can control this serverMaxWindowBits from WebSocket-Sharp client?

Thanks

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the CompressionMethod.Deflate setting shown in the issue and trace how the client negotiates per-message compression parameters during the WebSocket handshake. Compare that negotiation with the uWebsocket and Node.js ws behavior described; done means establishing whether serverMaxWindowBits can be controlled and identifying the required client-side change or limitation.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
networking
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.