# WebSocketChannelWithRetries

Defined in: [atomiq-chain-starknet/src/starknet/provider/WebSocketChannelWithRetries.ts:9](https://github.com/atomiqlabs/atomiq-chain-starknet/blob/697277c430597a8514a43540ef8b9a10e2b6a595/src/starknet/provider/WebSocketChannelWithRetries.ts#L9)

An impl of WebSocketChannel which override the default exponential backoff and makes it linear Also adds connection timeouts and retries if the initial connection fails. Retries indefinitely!

## Extends

* `unknown`

## Constructors

### Constructor

```
new WebSocketChannelWithRetries(options): WebSocketChannelWithRetries;
```

Defined in: [atomiq-chain-starknet/src/starknet/provider/WebSocketChannelWithRetries.ts:20](https://github.com/atomiqlabs/atomiq-chain-starknet/blob/697277c430597a8514a43540ef8b9a10e2b6a595/src/starknet/provider/WebSocketChannelWithRetries.ts#L20)

Creates a new websocket channel, you can pass an additional `options.connectionTimeoutMs` param, which defines a connection timeout, after the timeout the connection is re-attempted

#### Parameters

| Parameter | Type  | Description |
| --------- | ----- | ----------- |
| `options` | `any` |             |

#### Returns

`WebSocketChannelWithRetries`

#### Overrides

```
WebSocketChannel.constructor
```

## Methods

### reconnect()

```
reconnect(): void;
```

Defined in: [atomiq-chain-starknet/src/starknet/provider/WebSocketChannelWithRetries.ts:35](https://github.com/atomiqlabs/atomiq-chain-starknet/blob/697277c430597a8514a43540ef8b9a10e2b6a595/src/starknet/provider/WebSocketChannelWithRetries.ts#L35)

#### Returns

`void`
