troila-reconnecting-websocket

ReconnectingWebSocket =====================

Usage no npm install needed!

<script type="module">
  import troilaReconnectingWebsocket from 'https://cdn.skypack.dev/troila-reconnecting-websocket';
</script>

README

ReconnectingWebSocket

A small JavaScript library that decorates the WebSocket API to provide a WebSocket connection that will automatically reconnect if the connection is dropped.

It is API compatible, so when you have:

ws = new WebSocket('ws://....');

you can replace with:

ws = new ReconnectingWebSocket('ws://....');

Minified library with gzip compression is less than 600 bytes.