OnReconnect
OnReconnect is a term used in real-time networking and client libraries to denote a callback or event that handles the moment when a connection is being re-established after a disruption. It is commonly employed in systems that support automatic reconnection, such as WebSocket clients, messaging protocols, and live data streams. The exact behavior of onReconnect—whether it fires during a retry, after a successful reconnection, or both—depends on the specific library or framework.
Usage and context vary across implementations. Some libraries expose onReconnect as a property that the application
Common patterns and signatures include supplying the attempt number, the delay before the next retry, or information
See also: onConnect, onDisconnect, reconnect strategies, backoff algorithms, WebSocket, MQTT, Socket.IO.