HeartbeatServerOptions
Defined in: src/web/heartbeat/server.ts:3
Properties
Section titled “Properties”allowedOrigin?
Section titled “allowedOrigin?”
optionalallowedOrigin?: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
disconnectTimeout?
Section titled “disconnectTimeout?”
optionaldisconnectTimeout?:number
Defined in: src/web/heartbeat/server.ts:30
Time in milliseconds of not receiving heartbeat requests after which the communication channel is disconnected
Default
Section titled “Default”2000establishTimeout?
Section titled “establishTimeout?”
optionalestablishTimeout?:number
Defined in: src/web/heartbeat/server.ts:21
Reasonable time in milliseconds in which the communication channel needs to be established
Default
Section titled “Default”10000onDisconnect
Section titled “onDisconnect”onDisconnect: () =>
void
Defined in: src/web/heartbeat/server.ts:34
Callback when no heartbeats have been received for disconnectTimeout milliseconds
Returns
Section titled “Returns”void
onEstablish
Section titled “onEstablish”onEstablish: (
origin,source) =>void
Defined in: src/web/heartbeat/server.ts:16
Callback when first heartbeat has been received
Parameters
Section titled “Parameters”origin
Section titled “origin”string
source
Section titled “source”Window
Returns
Section titled “Returns”void
onEstablishTimeout
Section titled “onEstablishTimeout”onEstablishTimeout: () =>
void
Defined in: src/web/heartbeat/server.ts:25
Callback when no heartbeats have been received for establishTimeout milliseconds
Returns
Section titled “Returns”void
status?
Section titled “status?”
optionalstatus?:"pending"|"ready"
Defined in: src/web/heartbeat/server.ts:8
The initial server status to return to the client
Default
Section titled “Default”"ready"window?
Section titled “window?”
optionalwindow?:Window
Defined in: src/web/heartbeat/server.ts:39
Signer window, used to listen for incoming message events
Default
Section titled “Default”globalThis.window