<!--
 ⚠️  AUTO-GENERATED FILE - DO NOT EDIT MANUALLY
 This file is automatically generated by scripts/docs-generator.js
 To make changes, edit the source TypeScript files or update the generator script
-->

[remote](../../) / [Exports](../modules) / WebSocketTransport

# Class: WebSocketTransport

Simplified WebSocket Transport with Type Safety

## Implements

- `ITransport`

## Table of contents

### Constructors

- [constructor](WebSocketTransport#constructor)

### Methods

- [connect](WebSocketTransport#connect)
- [disconnect](WebSocketTransport#disconnect)
- [send](WebSocketTransport#send)
- [sendStream](WebSocketTransport#sendstream)
- [isConnected](WebSocketTransport#isconnected)
- [getCapabilities](WebSocketTransport#getcapabilities)

## Constructors

### constructor

• **new WebSocketTransport**(`config`): [`WebSocketTransport`](WebSocketTransport)

#### Parameters

| Name     | Type                     |
| :------- | :----------------------- |
| `config` | `ISimpleWebSocketConfig` |

#### Returns

[`WebSocketTransport`](WebSocketTransport)

#### Defined in

[remote/src/transport/websocket-transport-simple.ts:42](https://github.com/woojubb/robota/blob/4f4c8a3197e92ddd43d12dc9186b0771983054c9/packages/remote/src/transport/websocket-transport-simple.ts#L42)

## Methods

### connect

▸ **connect**(): `Promise`\<`void`\>

#### Returns

`Promise`\<`void`\>

#### Implementation of

ITransport.connect

#### Defined in

[remote/src/transport/websocket-transport-simple.ts:55](https://github.com/woojubb/robota/blob/4f4c8a3197e92ddd43d12dc9186b0771983054c9/packages/remote/src/transport/websocket-transport-simple.ts#L55)

---

### disconnect

▸ **disconnect**(): `Promise`\<`void`\>

#### Returns

`Promise`\<`void`\>

#### Implementation of

ITransport.disconnect

#### Defined in

[remote/src/transport/websocket-transport-simple.ts:94](https://github.com/woojubb/robota/blob/4f4c8a3197e92ddd43d12dc9186b0771983054c9/packages/remote/src/transport/websocket-transport-simple.ts#L94)

---

### send

▸ **send**\<`TData`\>(`request`): `Promise`\<`ITransportResponse`\<`TData`\>\>

#### Type parameters

| Name    |
| :------ |
| `TData` |

#### Parameters

| Name      | Type                                      |
| :-------- | :---------------------------------------- |
| `request` | `ITransportRequest`\<`IChatRequestBody`\> |

#### Returns

`Promise`\<`ITransportResponse`\<`TData`\>\>

#### Implementation of

ITransport.send

#### Defined in

[remote/src/transport/websocket-transport-simple.ts:110](https://github.com/woojubb/robota/blob/4f4c8a3197e92ddd43d12dc9186b0771983054c9/packages/remote/src/transport/websocket-transport-simple.ts#L110)

---

### sendStream

▸ **sendStream**\<`TData`\>(`request`): `AsyncIterable`\<`TData`, `any`, `any`\>

#### Type parameters

| Name    |
| :------ |
| `TData` |

#### Parameters

| Name      | Type                                      |
| :-------- | :---------------------------------------- |
| `request` | `ITransportRequest`\<`IChatRequestBody`\> |

#### Returns

`AsyncIterable`\<`TData`, `any`, `any`\>

#### Implementation of

ITransport.sendStream

#### Defined in

[remote/src/transport/websocket-transport-simple.ts:140](https://github.com/woojubb/robota/blob/4f4c8a3197e92ddd43d12dc9186b0771983054c9/packages/remote/src/transport/websocket-transport-simple.ts#L140)

---

### isConnected

▸ **isConnected**(): `boolean`

#### Returns

`boolean`

#### Implementation of

ITransport.isConnected

#### Defined in

[remote/src/transport/websocket-transport-simple.ts:146](https://github.com/woojubb/robota/blob/4f4c8a3197e92ddd43d12dc9186b0771983054c9/packages/remote/src/transport/websocket-transport-simple.ts#L146)

---

### getCapabilities

▸ **getCapabilities**(): `ITransportCapabilities`

#### Returns

`ITransportCapabilities`

#### Implementation of

ITransport.getCapabilities

#### Defined in

[remote/src/transport/websocket-transport-simple.ts:150](https://github.com/woojubb/robota/blob/4f4c8a3197e92ddd43d12dc9186b0771983054c9/packages/remote/src/transport/websocket-transport-simple.ts#L150)
