

# SocketAdapterOptionsType

<div class="api-docs__separator" data-reactroot="">

---

</div><div class="api-docs__import" data-reactroot="">

```ts
import { SocketAdapterOptionsType } from "@hyper-fetch/sockets"
```

</div><div class="api-docs__section">

## Description

</div><div class="api-docs__description"><span class="api-docs__do-not-parse">



</span></div><p class="api-docs__definition">

Defined in [socket/socket.types.ts:21](https://github.com/BetterTyped/hyper-fetch/blob/c3e2c45/packages/sockets/src/socket/socket.types.ts#L21)

</p><div class="api-docs__section">

## Preview

</div><div class="api-docs__preview type single">

```ts
type SocketAdapterOptionsType<SocketAdapterType> = (SocketOptionsType<SocketAdapterType> & { adapterOptions?: SSEAdapterOptionsType; isSSE: true }) | (SocketOptionsType<SocketAdapterType> & { adapterOptions?: WSAdapterOptionsType });
```

</div><div class="api-docs__section">

## Structure

</div><div class="api-docs__returns">

```ts
{adapter:SocketAdapterType,auth:Record<string, QueryParamType>,autoConnect:boolean,queryParams:Record<string, QueryParamType> | string,queryParamsConfig:{arrayFormat:bracket | index | comma | separator | bracket-separator | none,arraySeparator:string,dateParser:(value: QueryParamType) => string,encode:boolean,objectParser:(value: QueryParamType) => string,skipEmptyString:boolean,skipNull:boolean,strict:boolean},queryParamsStringify:(queryParams: QueryParamsType | string | NegativeTypes) => string,reconnect:number,reconnectTime:number,url:string,adapterOptions:{eventSourceInit:EventSourceInit,reconnectTimeout:number},isSSE:true} | {adapter:SocketAdapterType,auth:Record<string, QueryParamType>,autoConnect:boolean,queryParams:Record<string, QueryParamType> | string,queryParamsConfig:{arrayFormat:bracket | index | comma | separator | bracket-separator | none,arraySeparator:string,dateParser:(value: QueryParamType) => string,encode:boolean,objectParser:(value: QueryParamType) => string,skipEmptyString:boolean,skipNull:boolean,strict:boolean},queryParamsStringify:(queryParams: QueryParamsType | string | NegativeTypes) => string,reconnect:number,reconnectTime:number,url:string,adapterOptions:{heartbeat:boolean,heartbeatMessage:string,pingTimeout:number,pongTimeout:number,protocols:string[],reconnectTimeout:number}}
```

</div>