未验证 提交 e62028bd 编写于 作者: K king_he 提交者: Gitee

update en/application-dev/connectivity/websocket-connection.md.

Signed-off-by: Nking_he <6384784@qq.com>
上级 9264e533
......@@ -12,20 +12,20 @@ If an error occurs in any of the preceding processes, the client will receive a
The WebSocket connection function is mainly implemented by the WebSocket module. To use related APIs, you must declare the **ohos.permission.INTERNET** permission. The following table describes the related APIs.
| API| Description|
| API | Description |
| -------- | -------- |
| createWebSocket() | Creates a WebSocket connection.|
| connect() | Establishes a WebSocket connection to a given URL.|
| send() | Sends data through the WebSocket connection.|
| close() | Closes a WebSocket connection.|
| on(type:&nbsp;'open') | Enables listening for **open** events of a WebSocket connection.|
| off(type:&nbsp;'open') | Disables listening for **open** events of a WebSocket connection.|
| on(type:&nbsp;'message') | Enables listening for **message** events of a WebSocket connection.|
| off(type:&nbsp;'message') | Disables listening for **message** events of a WebSocket connection.|
| on(type:&nbsp;'close') | Enables listening for **close** events of a WebSocket connection.|
| off(type:&nbsp;'close') | Disables listening for **close** events of a WebSocket connection.|
| on(type:&nbsp;'error') | Enables listening for **error** events of a WebSocket connection.|
| off(type:&nbsp;'error') | Disables listening for **error** events of a WebSocket connection.|
| createWebSocket() | Creates a WebSocket connection. |
| connect() | Establishes a WebSocket connection to a given URL. |
| send() | Sends data through the WebSocket connection. |
| close() | Closes a WebSocket connection. |
| on(type:&nbsp;'open') | Enables listening for **open** events of a WebSocket connection. |
| off(type:&nbsp;'open') | Disables listening for **open** events of a WebSocket connection. |
| on(type:&nbsp;'message') | Enables listening for **message** events of a WebSocket connection. |
| off(type:&nbsp;'message') | Disables listening for **message** events of a WebSocket connection. |
| on(type:&nbsp;'close') | Enables listening for **close** events of a WebSocket connection. |
| off(type:&nbsp;'close') | Disables listening for **close** events of a WebSocket connection. |
| on(type:&nbsp;'error') | Enables listening for **error** events of a WebSocket connection. |
| off(type:&nbsp;'error') | Disables listening for **error** events of a WebSocket connection. |
## How to Develop
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册