imns / DurableWS

A resilient, TypeScript-based WebSocket client

Repository from Github https://github.comimns/DurableWSRepository from Github https://github.comimns/DurableWS

DurableWS (Durable Web Sockets)

DurableWS is a resilient, TypeScript-based WebSocket client designed for modern web applications. It offers robust connection handling, automatic reconnection with exponential backoff, idle detection, message queueing, and easy subscription management, ensuring your application maintains a reliable real-time connection under varying network conditions.

Features

  • Automatic Reconnection: Implements exponential backoff strategy to handle disconnections gracefully.
  • Idle Detection: Automatically detects idle states and triggers custom handlers.
  • Message Queueing: Outgoing messages are queued when the connection is down and sent when it's restored.
  • TypeScript Support: Fully typed interfaces for a better development experience.

Installation

npm install durablews

About

A resilient, TypeScript-based WebSocket client

License:Mozilla Public License 2.0


Languages

Language:TypeScript 98.0%Language:JavaScript 2.0%