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

Add websocket app-level ping/pong support #850

Merged

Conversation

danielgranhao
Copy link
Contributor

In the browser (e.g. WASM clients), it isn't possible to manage WebSocket ping/pong frames directly.

This PR introduces app-level ping/pong messages to the WebSocket status stream so that clients can implement a consistent keep-alive mechanism that works across native and WASM builds.

Copy link
Member

@michael1011 michael1011 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Concept ACK

Tests are missing

And we should add this new ping/pong message (with some context regarding why it's needed) to https://github.com/BoltzExchange/boltz-backend/blob/master/docs/api-v2.md#websocket

@danielgranhao
Copy link
Contributor Author

Concept ACK

Tests are missing

And we should add this new ping/pong message (with some context regarding why it's needed) to https://github.com/BoltzExchange/boltz-backend/blob/master/docs/api-v2.md#websocket

Thanks. Test added in 8c90816 and docs updated in a4af8eb.

Copy link
Member

@michael1011 michael1011 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We use prettier for the Markdown files: https://github.com/BoltzExchange/boltz-backend/actions/runs/13794552658/job/38582904888?pr=850

npm run prettier:write fixes that CI fail

Good to merge afterwards

@danielgranhao danielgranhao force-pushed the websocket-app-level-ping branch from a4af8eb to eccef74 Compare March 11, 2025 17:46
@michael1011 michael1011 merged commit c52fbf3 into BoltzExchange:master Mar 11, 2025
3 checks passed
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.

2 participants