提交 4e104f11 编写于 作者: Y Yangys

Update ErrroCode

Signed-off-by: NYangys <yangyousheng@huawei.com>
上级 84076318
......@@ -32,6 +32,19 @@ setIfaceConfig(iface: string, ic: InterfaceConfiguration, callback: AsyncCallbac
| ic | [InterfaceConfiguration](#interfaceconfiguration) | 是 | 要设置的网络接口配置信息 |
| callback | AsyncCallback\<void> | 是 | 回调函数,成功无返回,失败返回对应错误码。 |
**错误码:**
| 错误码ID | 错误信息 |
| ------- | ----------------------------------------|
| 201 | Permission denied. |
| 401 | Parameter error. |
| 2200001 | Invalid parameter value. |
| 2200002 | Operation failed. Cannot connect to service.|
| 2200003 | System internal error. |
| 2201005 | The device information does not exist. |
| 2201006 | Device disconnected. |
| 2201007 | Failed to write the user configuration. |
**示例:**
```js
......@@ -71,6 +84,19 @@ setIfaceConfig(iface: string, ic: InterfaceConfiguration): Promise\<void>
| ------------------- | ----------------------------------------------------------- |
| Promise\<void> | 以Promise形式返回执行结果。成功无返回,失败返回对应错误码。 |
**错误码:**
| 错误码ID | 错误信息 |
| ------- | ----------------------------------------|
| 201 | Permission denied. |
| 401 | Parameter error. |
| 2200001 | Invalid parameter value. |
| 2200002 | Operation failed. Cannot connect to service.|
| 2200003 | System internal error. |
| 2201005 | The device information does not exist. |
| 2201006 | Device disconnected. |
| 2201007 | Failed to write the user configuration. |
**示例:**
```js
......@@ -101,6 +127,17 @@ getIfaceConfig(iface: string, callback: AsyncCallback\<InterfaceConfiguration>):
| iface | string | 是 | 指定网络接口 |
| callback | AsyncCallback\<[InterfaceConfiguration](#interfaceconfiguration)> | 是 | 回调函数,返回指定网络接口信息 |
**错误码:**
| 错误码ID | 错误信息 |
| ------- | ----------------------------------------|
| 201 | Permission denied. |
| 401 | Parameter error. |
| 2200001 | Invalid parameter value. |
| 2200002 | Operation failed. Cannot connect to service.|
| 2200003 | System internal error. |
| 2201005 | The device information does not exist. |
**示例:**
```js
......@@ -143,6 +180,17 @@ getIfaceConfig(iface: string): Promise\<InterfaceConfiguration>
| --------------------------------- | ---------------------------------- |
| Promise\<[InterfaceConfiguration](#interfaceconfiguration)> | 以Promise形式返回接口信息。 |
**错误码:**
| 错误码ID | 错误信息 |
| ------- | ----------------------------------------|
| 201 | Permission denied. |
| 401 | Parameter error. |
| 2200001 | Invalid parameter value. |
| 2200002 | Operation failed. Cannot connect to service.|
| 2200003 | System internal error. |
| 2201005 | The device information does not exist. |
**示例:**
```js
......@@ -178,6 +226,17 @@ isIfaceActive(iface: string, callback: AsyncCallback\<number>): void
| iface | string | 是 | 接口名。为空时代表查询是否存在激活接口 |
| callback | AsyncCallback\<number> | 是 | 回调函数,已激活:1,未激活:0,其他为获取失败错误码。 |
**错误码:**
| 错误码ID | 错误信息 |
| ------- | ----------------------------------------|
| 201 | Permission denied. |
| 401 | Parameter error. |
| 2200001 | Invalid parameter value. |
| 2200002 | Operation failed. Cannot connect to service.|
| 2200003 | System internal error. |
| 2201005 | The device information does not exist. |
**示例:**
```js
......@@ -214,6 +273,17 @@ isIfaceActive(iface: string): Promise\<number>
| ----------------| ------------------------------------------------------------------ |
| Promise\<number> | 以Promise形式返回获取结果。已激活:1,未激活:0,其他为获取失败错误码。|
**错误码:**
| 错误码ID | 错误信息 |
| ------- | ----------------------------------------|
| 201 | Permission denied. |
| 401 | Parameter error. |
| 2200001 | Invalid parameter value. |
| 2200002 | Operation failed. Cannot connect to service.|
| 2200003 | System internal error. |
| 2201005 | The device information does not exist. |
**示例:**
```js
......@@ -242,6 +312,14 @@ getAllActiveIfaces(callback: AsyncCallback\<Array\<string>>): void
| -------- | ------------------------------------ | ---- | ------------------------------ |
| callback | AsyncCallback\<Array\<string>> | 是 | 回调函数,返回值为对应接口名。 |
**错误码:**
| 错误码ID | 错误信息 |
| ------- | ----------------------------------------|
| 201 | Permission denied. |
| 2200002 | Operation failed. Cannot connect to service.|
| 2200003 | System internal error. |
**示例:**
```js
......@@ -275,6 +353,14 @@ getAllActiveIfaces(): Promise\<Array\<string>>
| ------------------------------ | ----------------------------------------------- |
| Promise\<Array\<string>> | 以Promise形式返回获取结果。返回值为对应接口名。 |
**错误码:**
| 错误码ID | 错误信息 |
| ------- | ----------------------------------------|
| 201 | Permission denied. |
| 2200002 | Operation failed. Cannot connect to service.|
| 2200003 | System internal error. |
**示例:**
```js
......
......@@ -667,6 +667,9 @@ Socket的连接信息。
| port | number | 是 | 端口号,范围0~65535。 |
| size | number | 是 | 服务器响应信息的字节长度。 |
## UDP 错误码说明
UDP 错误码映射形式为:2301000 + 内核错误码。
## socket.constructTCPSocketInstance
constructTCPSocketInstance\(\): TCPSocket
......@@ -1453,6 +1456,9 @@ TCPSocket连接的其他属性。
| reuseAddress | boolean | 否 | 是否重用地址。默认为false。 |
| socketTimeout | number | 否 | 套接字超时时间,单位毫秒(ms)。 |
## TCP 错误码说明
TCP 错误码映射形式为:2301000 + 内核错误码。
## socket.constructTLSSocketInstance<sup>9+</sup>
constructTLSSocketInstance(): TLSSocket
......
......@@ -47,6 +47,8 @@
- [文件管理子系统错误码](errorcode-filemanagement.md)
- 网络管理
- [上传下载错误码](errorcode-request.md)
- [HTTP错误码](errorcode-http.md)
- [Socket错误码](errorcode-socket.md)
- 通信与连接
- [NFC错误码](errorcode-nfc.md)
- [RPC错误码](errorcode-rpc.md)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册