# WebSocketConnection

URL: https://www.caprid.com/docs/reference/typescript/caprid/relay-websocket/interfaces/websocketconnection/

Defined in: [relay-sdks/ts/packages/relay-websocket/src/index.ts:35](https://github.com/caprids/relay-sdks/blob/main/ts/packages/relay-websocket/src/index.ts#L35)

What one call of a [WebSocketTransportFactory](https://www.caprid.com/docs/reference/typescript/caprid/relay-websocket/type-aliases/websockettransportfactory/) returns: the shape the SDK's `createTransport` expects.

## Properties

### framing

```ts
framing: "websocket";
```

Defined in: [relay-sdks/ts/packages/relay-websocket/src/index.ts:41](https://github.com/caprids/relay-sdks/blob/main/ts/packages/relay-websocket/src/index.ts#L41)

Always `'websocket'`: the upgrade request carries the URL's path and query, as a WebTransport CONNECT does.

***

### ready

```ts
ready: Promise<void>;
```

Defined in: [relay-sdks/ts/packages/relay-websocket/src/index.ts:39](https://github.com/caprids/relay-sdks/blob/main/ts/packages/relay-websocket/src/index.ts#L39)

Resolves once the WebSocket is open and the peer selected an offered protocol.

***

### transport

```ts
transport: WebSocketMoqtTransport;
```

Defined in: [relay-sdks/ts/packages/relay-websocket/src/index.ts:37](https://github.com/caprids/relay-sdks/blob/main/ts/packages/relay-websocket/src/index.ts#L37)

The transport the MOQT session runs on.
