@tauri-apps/plugin-websocket
Classes
default
Constructors
new default()
Parameters
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 | Modifier | Type |
---|---|---|
id | public | number |
listeners | private | (arg ) => void [] |
Methods
addListener()
Parameters
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()
Returns
Promise
<void
>
Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/websocket/guest-js/index.ts#L89
send()
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()
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 |
---|---|
code | number |
reason | string |
ConnectionConfig
Properties
Property | Type |
---|---|
acceptUnmaskedFrames? | boolean |
headers? | HeadersInit |
maxFrameSize? | number |
maxMessageSize? | number |
maxWriteBufferSize? | number |
writeBufferSize? | number |
MessageKind<T, D>
Type parameters
Type parameter |
---|
T |
D |
Properties
Property | Type |
---|---|
data | D |
type | T |
Type Aliases
Message
Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/websocket/guest-js/index.ts#L26
© 2024 Tauri Contributors. CC-BY / MIT