WebsocketConnection class

Constructors

WebsocketConnection(string, IStringDictionary<string>, IStringDictionary<string>, IWebsocketMessageFormatter, ProxyInfo, boolean, string)

Properties

events
id
isDisposed
open
read
send
state

Methods

dispose()

Constructor Details

WebsocketConnection(string, IStringDictionary<string>, IStringDictionary<string>, IWebsocketMessageFormatter, ProxyInfo, boolean, string)

new WebsocketConnection(uri: string, queryParameters: IStringDictionary<string>, headers: IStringDictionary<string>, messageFormatter: IWebsocketMessageFormatter, proxyInfo: ProxyInfo, enableCompression?: boolean, connectionId?: string)

Parameters

uri

string

queryParameters

IStringDictionary<string>

headers

IStringDictionary<string>

messageFormatter
IWebsocketMessageFormatter
proxyInfo
ProxyInfo
enableCompression

boolean

connectionId

string

Property Details

events

EventSource<ConnectionEvent> events

Property Value

id

string id

Property Value

string

isDisposed

isDisposed: () => boolean

Property Value

() => boolean

open

open: () => Promise<ConnectionOpenResponse>

Property Value

() => Promise<ConnectionOpenResponse>

read

read: () => Promise<ConnectionMessage>

Property Value

() => Promise<ConnectionMessage>

send

send: (message: ConnectionMessage) => Promise<void>

Property Value

(message: ConnectionMessage) => Promise<void>

state

state: () => ConnectionState

Property Value

() => ConnectionState

Method Details

dispose()

function dispose()

Returns

Promise<void>