0.1.0 • Published 7 years ago
@khromkov/rws v0.1.0
RWS - lib for auto reconnect dropped WebSocket connection. It has almost same api as WebSocket. So you can just replace WebSocket to RWS in your code for default behavior.
const ws = RWS('ws://url', 'protocols', options);
Options
- reconnectDelay (number) - timeout reconnect after drop. default: 0
- reconnectDelayFactor (number) - increase delay factor for next reconnect, no effect for reconnectDelay === 0. default: 1
- reconnectMaxCount (number) - max reconnect count. default: Infinity.
- shouldReconnect (function(event: CloseEvent): bool) - if it is defined invoke before reconnect with last close args. If return false, reconnection does not occur.
0.1.0
7 years ago
0.1.0-alpha.3
7 years ago
0.1.0-alpha.2
7 years ago
0.1.0-alpha.1
7 years ago
0.1.0-alpha.0
7 years ago
0.0.2
7 years ago
0.0.1
7 years ago