@tauri-apps/plugin-websocket
Classes
default
Constructors
new default()
new default(id, listeners): defaultParameters
| Parameter | Type | 
|---|---|
id | number | 
listeners | (arg) => void[] | 
Returns
Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/websocket/guest-js/index.ts#L37
Properties
| Property | Type | Defined in | 
|---|---|---|
 id | number | Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/websocket/guest-js/index.ts#L34 | 
Methods
addListener()
addListener(cb): voidParameters
| Parameter | Type | 
|---|---|
cb | (arg) => void | 
Returns
void
Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/websocket/guest-js/index.ts#L66
disconnect()
disconnect(): Promise<void>Returns
Promise<void>
Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/websocket/guest-js/index.ts#L89
send()
send(message): Promise<void>Parameters
| Parameter | Type | 
|---|---|
message | string | number[] | Message | 
Returns
Promise<void>
Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/websocket/guest-js/index.ts#L70
connect()
static connect(url, config?): Promise<default>Parameters
| Parameter | Type | 
|---|---|
url | string | 
config? | ConnectionConfig | 
Returns
Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/websocket/guest-js/index.ts#L42
Interfaces
CloseFrame
Properties
| Property | Type | Defined in | 
|---|---|---|
 code | number | Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/websocket/guest-js/index.ts#L22 | 
 reason | string | Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/websocket/guest-js/index.ts#L23 | 
ConnectionConfig
Properties
| Property | Type | Defined in | 
|---|---|---|
 acceptUnmaskedFrames? | boolean | Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/websocket/guest-js/index.ts#L12 | 
 headers? | HeadersInit | Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/websocket/guest-js/index.ts#L13 | 
 maxFrameSize? | number | Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/websocket/guest-js/index.ts#L11 | 
 maxMessageSize? | number | Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/websocket/guest-js/index.ts#L10 | 
 maxWriteBufferSize? | number | Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/websocket/guest-js/index.ts#L9 | 
 writeBufferSize? | number | Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/websocket/guest-js/index.ts#L8 | 
MessageKind<T, D>
Type Parameters
| Type Parameter | 
|---|
T | 
D | 
Properties
| Property | Type | Defined in | 
|---|---|---|
 data | D | Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/websocket/guest-js/index.ts#L18 | 
 type | T | Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/websocket/guest-js/index.ts#L17 | 
Type Aliases
Message
type Message:  | MessageKind<"Text", string>  | MessageKind<"Binary", number[]>  | MessageKind<"Ping", number[]>  | MessageKind<"Pong", number[]>| MessageKind<"Close", CloseFrame | null>;Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/websocket/guest-js/index.ts#L26
© 2024 Tauri Contributors. CC-BY / MIT