ConnectionLossType
Why a connection or a connection attempt ended. Every field is optional - a transport reports what it knows.
Import
import { ConnectionLossType } from "@hyper-fetch/sockets"
Source
Package
Preview
type ConnectionLossType = {
code?: number;
error?: Error;
reason?: string;
}
Structure
ConnectionLossType
| Name | Type | Description |
|---|---|---|
| code | | Close code of the transport, e.g. a WebSocket close code |
| error | | Error that ended the connection - a transport error, the connection timeout or a heartbeat timeout |
| reason | | Close reason sent with the code |

