-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
perf: reduce tokio tasks #45
base: master
Are you sure you want to change the base?
perf: reduce tokio tasks #45
Conversation
(cherry picked from commit 645bc76)
…better_error_handling # Conflicts: # src/session.rs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
somehow all connections are being dropped after 10 seconds.
It looks like no pongs are being sent as response to pings.
Also, are you sure that removing RawMessage
was a good idea? I believe it was a good abstraction between what's handled in client.rs
/server.rs
and what is handled in socket.rs
, e.g Ping/Pong didn't exist on Message
, as they were handled by the Socket
itself.
For pong I don't need it in my project so I didn't test it out.
There's no such 2 layer abstraction in other libraries. Having one larger enum Message, one can control ws behavior of websocket with more detail. It also reduces maintenance cost and make it easier to implement StreamImpl.
Have you considered interoperability with other ws clients and servers? I definite need it without requiring clients to use certain framework
…On 1 Apr 2023 at 21:36 +0800, Grzegorz Baranski ***@***.***>, wrote:
@gbaranski requested changes on this pull request.
somehow all connections are being dropped after 10 seconds.
It looks like no pongs are being sent as response to pings.
Also, are you sure that removing RawMessage was a good idea? I believe it was a good abstraction between what's handled in client.rs/server.rs and what is handled in socket.rs, e.g Ping/Pong didn't exist on Message, as they were handled by the Socket itself.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Yep |
I mean not every implementation follows the standard. Even for ping pong everyone do it differently: no ping-pong required, ping-pong as messages, use ws ping-pong, use ws ping-pong with certain messages
Socket can't handle every kind of ping-pong. So merging RawMessage to Message gives more flexibility to keep behavior of previous implementation, both client side and server side |
This is a secondary PR to further reduce tokio tasks