Lines Matching refs:WebSocket
1 # WebSocket Connection
5 …WebSocket to establish a bidirectional connection between a server and a client. Before doing this…
9 The WebSocket module supports the heartbeat detection mechanism. After a WebSocket connection is es…
13 The WebSocket connection function is mainly implemented by the [WebSocket module](../reference/apis…
17 | createWebSocket() | Creates a WebSocket connection. |
18 | connect() | Establishes a WebSocket connection to a given URL. |
19 | send() | Sends data through the WebSocket connection. |
20 | close() | Closes a WebSocket connection. |
21 | on(type: 'open') | Enables listening for **open** events of a WebSocket connection. …
22 | off(type: 'open') | Disables listening for **open** events of a WebSocket connection. …
23 | on(type: 'message') | Enables listening for **message** events of a WebSocket connection. |
24 | off(type: 'message') | Disables listening for **message** events of a WebSocket connection.|
25 | on(type: 'close') | Enables listening for **close** events of a WebSocket connection. …
26 | off(type: 'close') | Disables listening for **close** events of a WebSocket connection. …
27 | on(type: 'error') | Enables listening for **error** events of a WebSocket connection. …
28 | off(type: 'error') | Disables listening for **error** events of a WebSocket connection. …
34 2. Create a **WebSocket** object.
36 3. (Optional) Subscribe to WebSocket **open**, **message**, **close**, and **error** events.
38 4. Establish a WebSocket connection to a given URL.
40 5. Close the WebSocket connection if it is no longer needed.