https://github.com/hardfire/stickywebsocket
tries to reconnect to the websocket server using an exponential backoff algorithm
https://github.com/hardfire/stickywebsocket
Last synced: 12 months ago
JSON representation
tries to reconnect to the websocket server using an exponential backoff algorithm
- Host: GitHub
- URL: https://github.com/hardfire/stickywebsocket
- Owner: hardfire
- Created: 2014-01-04T21:47:28.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2015-01-09T20:47:52.000Z (over 11 years ago)
- Last Synced: 2025-06-09T01:36:58.835Z (about 1 year ago)
- Language: JavaScript
- Size: 137 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# Sticky WebSockets
## Introduction
It wraps the basic websocket object and tries to reconnect to the server if it loses connection.
It works exactly like a websocket client.
`var ws = new stickyWebSocket("ws://awesome:port");`
supports onopen, onclose, onconnecting, onerror events
use ws.send() and ws.close() to send and close respectively
## Note
uses the exponential backoff algorithm from
http://dthain.blogspot.nl/2009/02/exponential-backoff-in-distributed.html
## found an error?
Well, this just came out another [project](https://github.com/hardfire/mekespo) I was working on an might have errors. I like pull requests more,if not then be a good person and report the errors so that we can fix them :D
Note : I have not tested this thoroughly but it is kind of a small and cute library and should work in general. putting it on github might help someone who wants to do something similar