Transport for SIP over secure WebSocket (WSS).
Signature:
export declare class Transport implements TransportDefinition
Constructor | Modifiers | Description |
---|---|---|
(constructor)(logger, options) | Constructs a new instance of the Transport class |
Property | Modifiers | Type | Description |
---|---|---|---|
onConnect | (() => void) | undefined |
||
onDisconnect | ((error?: Error) => void) | undefined |
||
onMessage | ((message: string) => void) | undefined |
||
protocol | string |
The protocol. | |
server | string |
The URL of the WebSocket Server. | |
state | TransportState |
Transport state. | |
stateChange | Emitter<TransportState> |
Transport state change emitter. | |
ws | WebSocket | undefined |
The WebSocket. |
Method | Modifiers | Description |
---|---|---|
connect() | Connect to network. Resolves once connected. Otherwise rejects with an Error. | |
disconnect() | Disconnect from network. Resolves once disconnected. Otherwise rejects with an Error. | |
dispose() | ||
isConnected() | Returns true if the state equals "Connected". |
|
send(message) | Sends a message. Resolves once message is sent. Otherwise rejects with an Error. |