SocketTask overview
WebSocket task. This is returned when my.connectSocket JSAPI creates a multi-instance WebSocket (multiple = true). For details, see the multiple parameter.
Property
Property | Type | Required | Description |
readyState | Number | Yes | The state of
|
Methods
Method name | Type | Description |
Function | Send data via WebSocket. | |
Function | Close the WebSocket connection. | |
Function | Listen to the event of enabling the WebSocket connection. | |
Function | Listen to the event of disabling the WebSocket connection. | |
Function | Listen to WebSocket error events. | |
Function | Listen to the event of receiving server messages by WebSocket. | |
Function | Unlisten to the event of enabling the WebSocket connection. | |
Function | Unlisten to the event of disabling the WebSocket connection. | |
Function | Unlisten to WebSocket error events. | |
Function | Unlisten to the event of receiving server messages by WebSocket. |