- Notifications
You must be signed in to change notification settings - Fork17
Releases: github/stable-socket
Releases · github/stable-socket
v1.1.1
37641a2
This commit was created on GitHub.com and signed with GitHub’sverified signature.
Compare
Could not load tags
Nothing to show
{{ refName }}defaultLoading
What's Changed
Full Changelog:v1.1.0...v1.1.1
v1.1.0
b345902
This commit was created on GitHub.com and signed with GitHub’sverified signature. The key has expired.
Compare
Could not load tags
Nothing to show
{{ refName }}defaultLoading
What's Changed
- feat: add a new configurable reconnectWindow by@keithamus in#3
Full Changelog:v1.0.0...v1.1.0
Assets2
Uh oh!
There was an error while loading.Please reload this page.
1.0.0
Compare
Could not load tags
Nothing to show
{{ refName }}defaultLoading
A stable release with no changes since 0.1.2.
Assets2
Uh oh!
There was an error while loading.Please reload this page.
0.1.1
Compare
Could not load tags
Nothing to show
{{ refName }}defaultLoading
StableSocket
A web socket that reconnects.
Installation
$ npm install @github/stable-socket
Usage
import{StableSocket}from'@github/stable-socket'constdelegate={socketDidOpen(socket:Socket){// Socket is ready to write.socket.send('Hello')},socketDidClose(socket:Socket,code?:number,reason?:string){// Socket closed and will retry the connection.},socketDidFinish(socket:Socket){// Socket closed for good and will not retry.},socketDidReceiveMessage(socket:Socket,message:string){// Socket read data from the connection.}}constpolicy={timeout:4000,attempts:Infinity,maxDelay:60000}constsocket=newStableSocket('wss://live.example.com',delegate,policy)socket.open()
Assets2
Uh oh!
There was an error while loading.Please reload this page.