Skip to content
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

websocket extension should implement ping/pong #31157

Closed
edeandrea opened this issue Feb 14, 2023 · 1 comment · Fixed by #38745
Closed

websocket extension should implement ping/pong #31157

edeandrea opened this issue Feb 14, 2023 · 1 comment · Fixed by #38745
Labels
Milestone

Comments

@edeandrea
Copy link
Contributor

Description

The WebSocket API provides the ability to have pings and pongs, which allow a websocket connection to be kept alive between clients and servers.

Currently the Quarkus Websocket extension does not help with any of this. I would argue that implementing the pong on the server-side would be something common that every websocket server would want to do, hence I am proposing that the Quarkus Websocket extension should do this for the user automatically. Similarly on the WebSocket client, I would think anyone using Quarkus as a Websocket client would want/need this functionality out of the box.

It just seems like the right thing to do. Other frameworks (like SockJS for example) do this for their users.

Additionally, we would need to document how to use it. I can certainly see a situation where a user may use Quarkus as a back-end service and want the functionality server-side, but may need to manually implement the client side in the browser.

Implementation ideas

Maybe, for backwards compatibility, it is initially turned off & can be enabled via a configuration property (both client & server side)?

@edeandrea
Copy link
Contributor Author

Was this really implemented? I see in #38745 all that was done was that there was a test added. Does this mean that the server-side implementation will automatically handle the ping messages and reply with a pong? The client just needs to send the ping to the server?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants