Network
my.closeSocket
Close a WebSocket connection.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Close a WebSocket connection.
| Property | Type | Required | Description |
|---|---|---|---|
| success | Function | No | Callback on success |
| fail | Function | No | Callback on failure |
| complete | Function | No | Callback that always executes |
my.onSocketOpen(() => {
my.closeSocket();
});
my.onSocketClose((res) => {
console.log('Socket closed');
});