### Hierarchy

- WebsocketProvider

## Index

### Constructors

- constructor

### Properties

- connection
- customTimeout
- lastChunk
- lastChunkTimeout
- notificationCallbacks
- responseCallbacks
- url

### Methods

- addDefaultEvents
- addResponseCallback
- isConnect
- on
- onMessage
- parseResponse
- removeAllListeners
- removeListener
- reset
- send
- timeout

## Constructors

### constructor

- new WebsocketProvider(url: string, options?: any): WebsocketProvider

- - Defined in providers/wsProvider.ts:15

  #### Parameters

  - ##### url: string

  - ##### Optional options: any

  #### Returns WebsocketProvider

## Properties

### connection

connection: any

- Defined in providers/wsProvider.ts:12

### customTimeout

customTimeout: any

- Defined in providers/wsProvider.ts:15

### lastChunk

lastChunk: any

- Defined in providers/wsProvider.ts:13

### lastChunkTimeout

lastChunkTimeout: any

- Defined in providers/wsProvider.ts:14

### notificationCallbacks

notificationCallbacks: any[]

- Defined in providers/wsProvider.ts:11

### responseCallbacks

responseCallbacks: object

- Defined in providers/wsProvider.ts:10

### url

url: string

- Defined in providers/wsProvider.ts:9

## Methods

### Private addDefaultEvents

- addDefaultEvents(): void

- - Defined in providers/wsProvider.ts:146

  Will add the error and end event to timeout existing calls

  #### Returns void

### Private addResponseCallback

- addResponseCallback(payload: any, callback: any): void

- - Defined in providers/wsProvider.ts:250

  Get the adds a callback to the responseCallbacks object

  #### Parameters

  - ##### payload: any

  - ##### callback: any

  #### Returns void

### isConnect

- isConnect(): boolean

- - Defined in providers/wsProvider.ts:31

  #### Returns boolean

### on

- on(type: any, callback: any): void

- - Defined in providers/wsProvider.ts:66

  Listen for specified events

  #### Parameters

  - ##### type: any

  - ##### callback: any

  #### Returns void

### Private onMessage

- onMessage(e: any): void

- - Defined in providers/wsProvider.ts:163

  Listen for connection response

  #### Parameters

  - ##### e: any

  #### Returns void

### Private parseResponse

- parseResponse(data: string): any[]

- - Defined in providers/wsProvider.ts:215

  Will parse the response and make an array out of it.

  #### Parameters

  - ##### data: string

  #### Returns any[]

### removeAllListeners

- removeAllListeners(type: string): void

- - Defined in providers/wsProvider.ts:110

  Remove all listening event

  #### Parameters

  - ##### type: string

  #### Returns void

### removeListener

- removeListener(type: string, callback: any): void

- - Defined in providers/wsProvider.ts:95

  Remove the specified listening event

  #### Parameters

  - ##### type: string

  - ##### callback: any

  #### Returns void

### reset

- reset(): void

- - Defined in providers/wsProvider.ts:132

  Resets the providers, clears all callbacks

  #### Returns void

### send

- send(payload: any, callback: any): void

- - Defined in providers/wsProvider.ts:41

  Send request

  #### Parameters

  - ##### payload: any

  - ##### callback: any

  #### Returns void

### Private timeout

- timeout(): void

- - Defined in providers/wsProvider.ts:199

  Timeout all requests when the end/error event is fired

  #### Returns void

Generated using TypeDoc