> For a complete index of all SignalWire documentation pages, fetch https://signalwire.com/docs/llms.txt

# WebSocketAdapter

> Browser-compatible WebSocket constructor type.

```ts
type WebSocketAdapter = (url, protocols?) => WebSocketClient
```

Browser-compatible WebSocket constructor type.

## **Parameters**

| Parameter    | Type                    |
| ------------ | ----------------------- |
| `url`        | `string` \| `URL`       |
| `protocols?` | `string` \| `string`\[] |

## **Returns**

`WebSocketClient`