Skip to content

Interface: CreateWebSocketOption

core/useWebSocket.CreateWebSocketOption

包装器选项。

Properties

autoReconnect

Optional autoReconnect: boolean | { delay?: number ; retries?: number }

重连配置。


heartbeat

Optional heartbeat: boolean | { interval?: number ; message?: string | ArrayBuffer | Blob }

心跳配置。


interceptor

Optional interceptor: WebSocketInterceptor

拦截器对象。


params

Optional params: Collection

请求参数。


protocols

Optional protocols: string | string[]

协议字符串 or 包含协议字符串的数组。