Skip to main content
Version: v10.0.0

TrpcKeepAliveOptionsType

Keep-alive of the tRPC WebSocket protocol. The client sends PING when the connection is quiet and treats it as lost when the PONG does not arrive in time.


Import
import { TrpcKeepAliveOptionsType } from "@hyper-fetch/trpc"

Preview​

type TrpcKeepAliveOptionsType = {
enabled: boolean;
intervalMs?: number;
pongTimeoutMs?: number;
}

Structure​

TrpcKeepAliveOptionsType
NameTypeDescription
enabled
boolean
intervalMs
number

How long the connection can be quiet before the client sends PING , in milliseconds.

pongTimeoutMs
number

How long the client waits for PONG before it reconnects, in milliseconds.