ws-chan

WebSocket Channel — websocket interaction modeled as a pair of streams for incoming and outgoing messages correspondingly

Usage no npm install needed!

<script type="module">
  import wsChan from 'https://cdn.skypack.dev/ws-chan';
</script>

README

ws-chan

WebSocket interaction modeled as a pair of streams, for incoming and outgoing messages correspondingly. It provides:

  • JSON encoding/decoding of incoming/outgoing messages correspondingly
  • reconnect logic with exponential backoff (by default)