Skip to content

Conversation

@willrnch
Copy link

@willrnch willrnch commented Aug 2, 2023

No description provided.

@willrnch willrnch marked this pull request as draft August 2, 2023 14:22
@willrnch willrnch mentioned this pull request Aug 2, 2023
@spy16x
Copy link

spy16x commented Jun 27, 2025

What is the state of this implementation?

(I have built a websocket server for some production use-case with this lib. The clients are in flutter. Now I'm seeing a bunch of errors like ReservedBitsNotZero, InvalidValue while reading from the socket. My guess is, the client is doing compression 😅 I'm worried now that this doesn't have support yet).

@pboft
Copy link

pboft commented Oct 31, 2025

What is the state of this implementation?

(I have built a websocket server for some production use-case with this lib. The clients are in flutter. Now I'm seeing a bunch of errors like ReservedBitsNotZero, InvalidValue while reading from the socket. My guess is, the client is doing compression 😅 I'm worried now that this doesn't have support yet).

I am seeing these too "ReservedBitsNotZero, InvalidValue while reading from the socket.". Originally, I believe it to be due to client-side deflate compression, however, strangely inspecting the raw packets in wireshark showed no set bits.

Regardless - what is required to help get this PR over the line ?

Also, is "ReservedBitsNotZero, InvalidValue while reading from the socket.". definitely not a parsing/decoding bug from the underlying library framing?

Thanks

@spy16x
Copy link

spy16x commented Oct 31, 2025

@pboft

The socket read/write are not cancellation safe. So if you're using them with tokio::select! or something it can cause partial frame reads and corrupt the whole stream.

This is what was happening in my case. Not related to compression.

I'd suggest you check this in your usecase too.

@pboft
Copy link

pboft commented Nov 3, 2025

@pboft

The socket read/write are not cancellation safe. So if you're using them with tokio::select! or something it can cause partial frame reads and corrupt the whole stream.

This is what was happening in my case. Not related to compression.

I'd suggest you check this in your usecase too.

That's super helpful, sounds like it's exactly what might be happening. I'll check that out ASAP.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants