Parameters
| Property | Type | Required | Description |
|---|---|---|---|
| url | String | Yes | WebSocket URL (wss:// required in production) |
| header | Object | No | Request headers |
| success | Function | No | Callback on success |
| fail | Function | No | Callback on failure |
| complete | Function | No | Callback that always executes |
Code Example
Related APIs
my.sendSocketMessage
Send message
my.closeSocket
Close connection