ConnectionAttemptType
Handle of one connection attempt, given to the adapter's
open
Import
import { ConnectionAttemptType } from "@hyper-fetch/sockets"
Source
Package
Preview
type ConnectionAttemptType<Adapter> = {
connection: SocketConnectionType<Adapter>;
interrupted: () => void;
isCurrent: () => boolean;
lost: (loss?: ConnectionLossType) => void;
ready: () => void;
}
Structure
ConnectionAttemptType
| Name | Type | Description |
|---|---|---|
| connection | | Connection details after the
|
| interrupted | | The connection dropped and the transport reconnects by itself (e.g.
|
| isCurrent | |
|
| lost | | The transport is gone. The engine closes it and decides about the next attempt. |
| ready | | The connection can carry messages - call it on open, or after the handshake of protocols that have one.
Calling it again after
|

