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

Callback when a heartbeat has come or gone #621

Closed
1 task done
StareStarrySky opened this issue Jan 5, 2024 · 1 comment
Closed
1 task done

Callback when a heartbeat has come or gone #621

StareStarrySky opened this issue Jan 5, 2024 · 1 comment

Comments

@StareStarrySky
Copy link

StareStarrySky commented Jan 5, 2024

The necessity of two new Properties named onHeartbeatIn and onHeartbeatOut likely add into the Client CLASS, when a heartbeat has come or gone?

I want to show a blinking light means heartbeat ping and pong, however there's no problem if don't have this function for me.
Wait for other conditions if exist and necessary.

@kum-deepak
Copy link
Member

This is not a planned feature. Please submit a PR if you need this implemented.

There is an alternate way to achieve this. It is possible to wrap the underlying WebSocket and extend its behavior. Please look at the test cases in the library source code for an example of how it can be developed and used. You can just copy the code from there.

In your wrapper, you can watch for packets coming in and out to create the blinking lights.

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

No branches or pull requests

2 participants