ReconnectingWebSocket is a small JavaScript library that wraps the standard WebSocket API with automatic reconnection behavior. It is designed as a drop-in replacement, so developers can switch from WebSocket to ReconnectingWebSocket with minimal code changes. When a connection closes, the library automatically attempts to reconnect instead of leaving the socket dead. It keeps trying until the connection succeeds or until a configured attempt limit is reached. The library includes options for debug logging, automatic opening, reconnect intervals, maximum reconnect delay, reconnect decay, timeouts, and maximum attempts. Overall, it is useful for real-time web apps that need more resilient WebSocket connections.

Features

  • Drop-in wrapper for the JavaScript WebSocket API
  • Automatic reconnection after connection loss
  • Repeated reconnect attempts until success or limit
  • Configurable reconnect interval and maximum delay
  • Connection timeout and reconnect decay options
  • Debug logging and manual open or close controls

Project Samples

Project Activity

See All Activity >

Categories

Design

License

MIT License

Follow ReconnectingWebSocket

ReconnectingWebSocket Web Site

Other Useful Business Software
$300 Free Credits to Build on Google Cloud Icon
$300 Free Credits to Build on Google Cloud

New to Google Cloud? Get $300 in credits to explore Compute Engine, BigQuery, Cloud Run, Gemini Enterprise Agent Platform, and more.

Start your next project with $300 in free Google Cloud credit. Spin up VMs, run containers, query petabytes in BigQuery, or build agents with Gemini Enterprise Agent Platform. Once your credits are used, keep building with 20+ always-free tier products including Compute Engine, Cloud Storage, GKE, and Cloud Run functions. No commitment required—just sign up and start building.
Claim $300 Free
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of ReconnectingWebSocket!

Additional Project Details

Programming Language

JavaScript

Related Categories

JavaScript Design Software

Registered

18 hours ago