Network
my.sendSocketMessage
Send data through a WebSocket connection.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Send data through a WebSocket connection.
| Property | Type | Required | Description |
|---|---|---|---|
| data | String | Yes | The data to be sent, in text string or base64 encoded string. |
| isBuffer | Boolean | No | If true, the data field represents base64 encoded binary strings. If empty, the data field represents normal strings. |
| success | Function | No | Callback on success |
| fail | Function | No | Callback on failure |
| complete | Function | No | Callback that always executes |
my.sendSocketMessage({
data: JSON.stringify({ action: 'ping' }),
success: () => {
console.log('Message sent');
}
});