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

Connection status callback #58

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

smcdonald-bepress
Copy link
Contributor

This patch adds an optional "status_callback" parameter to the connection options. This callback is called with a single boolean parameter indicating the connection status only when the state changes (i.e. it does not repeatedly fire with "false" when a connection attempt fails).

If your code relies on the websocket connection for major functionality, this provides a means to give feedback to the user and/or client code if the connection is lost. I'm open to other ideas to achieve this goal, but this seemed like the simplest and most flexible way to get there.

@jrief
Copy link
Owner

jrief commented Dec 21, 2015

status_callback then would have to become an additional configuration parameter.
This should be documented.

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