OrpcWebsocketAdapterOptionsType
Options of the
OrpcWebsocketAdapter
, set with the
adapterOptions
of the socket or per connection in
onConnect
Import
import { OrpcWebsocketAdapterOptionsType } from "@hyper-fetch/orpc"
Source
Package
Preview
type OrpcWebsocketAdapterOptionsType = {
WebSocket?: typeof WebSocket;
autoConnect?: boolean;
headers?: Record<string, string>;
protocols?: string | string[];
}
Structure
OrpcWebsocketAdapterOptionsType
| Name | Type | Description |
|---|---|---|
| WebSocket | | The WebSocket constructor, e.g. from the
|
| autoConnect | | Connects when the socket is created. Without it, call
|
| headers | | Headers of every subscription request, the procedures read them the same as the headers of HTTP requests |
| protocols | | Subprotocols passed to the
|

