Skip to content

HeartbeatServerOptions

Defined in: src/web/heartbeat/server.ts:3

optional allowedOrigin?: string | null

Defined in: src/web/heartbeat/server.ts:12

The allowed origin that the communication channel can be established with, recommended for secure re-establishment


optional disconnectTimeout?: number

Defined in: src/web/heartbeat/server.ts:30

Time in milliseconds of not receiving heartbeat requests after which the communication channel is disconnected

2000

optional establishTimeout?: number

Defined in: src/web/heartbeat/server.ts:21

Reasonable time in milliseconds in which the communication channel needs to be established

10000

onDisconnect: () => void

Defined in: src/web/heartbeat/server.ts:34

Callback when no heartbeats have been received for disconnectTimeout milliseconds

void


onEstablish: (origin, source) => void

Defined in: src/web/heartbeat/server.ts:16

Callback when first heartbeat has been received

string

Window

void


onEstablishTimeout: () => void

Defined in: src/web/heartbeat/server.ts:25

Callback when no heartbeats have been received for establishTimeout milliseconds

void


optional status?: "pending" | "ready"

Defined in: src/web/heartbeat/server.ts:8

The initial server status to return to the client

"ready"

optional window?: Window

Defined in: src/web/heartbeat/server.ts:39

Signer window, used to listen for incoming message events

globalThis.window