Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Docs
提交
708d65c3
D
Docs
项目概览
OpenHarmony
/
Docs
大约 2 年 前同步成功
通知
161
Star
293
Fork
28
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
Docs
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
708d65c3
编写于
2月 13, 2023
作者:
Z
zhanghaifeng
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Description: fix comments
Signed-off-by:
N
zhanghaifeng
<
zhanghaifeng11@huawei.com
>
上级
79eeef60
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
30 addition
and
20 deletion
+30
-20
zh-cn/application-dev/reference/apis/js-apis-net-ethernet.md
zh-cn/application-dev/reference/apis/js-apis-net-ethernet.md
+6
-6
zh-cn/application-dev/reference/apis/js-apis-net-sharing.md
zh-cn/application-dev/reference/apis/js-apis-net-sharing.md
+20
-10
zh-cn/application-dev/reference/apis/js-apis-socket.md
zh-cn/application-dev/reference/apis/js-apis-socket.md
+4
-4
未找到文件。
zh-cn/application-dev/reference/apis/js-apis-net-ethernet.md
浏览文件 @
708d65c3
...
@@ -49,9 +49,9 @@ setIfaceConfig(iface: string, ic: InterfaceConfiguration, callback: AsyncCallbac
...
@@ -49,9 +49,9 @@ setIfaceConfig(iface: string, ic: InterfaceConfiguration, callback: AsyncCallbac
```
js
```
js
ethernet
.
setIfaceConfig
(
"
eth0
"
,
{
ethernet
.
setIfaceConfig
(
"
eth0
"
,
{
mode
:
0
,
mode
:
0
,
ipAddr
:
"
192.168.
1.123
"
,
ipAddr
:
"
192.168.
xx.xxx
"
,
route
:
"
192.168.
1.1
"
,
route
:
"
192.168.
xx.xxx
"
,
gateway
:
"
192.168.
1.1
"
,
gateway
:
"
192.168.
xx.xxx
"
,
netMask
:
"
255.255.255.0
"
,
netMask
:
"
255.255.255.0
"
,
dnsServers
:
"
1.1.1.1
"
,
dnsServers
:
"
1.1.1.1
"
,
domain
:
"
2.2.2.2
"
domain
:
"
2.2.2.2
"
...
@@ -107,9 +107,9 @@ setIfaceConfig(iface: string, ic: InterfaceConfiguration): Promise\<void>
...
@@ -107,9 +107,9 @@ setIfaceConfig(iface: string, ic: InterfaceConfiguration): Promise\<void>
```
js
```
js
ethernet
.
setIfaceConfig
(
"
eth0
"
,
{
ethernet
.
setIfaceConfig
(
"
eth0
"
,
{
mode
:
0
,
mode
:
0
,
ipAddr
:
"
192.168.
1.123
"
,
ipAddr
:
"
192.168.
xx.xxx
"
,
route
:
"
192.168.
1.1
"
,
route
:
"
192.168.
xx.xxx
"
,
gateway
:
"
192.168.
1.1
"
,
gateway
:
"
192.168.
xx.xxx
"
,
netMask
:
"
255.255.255.0
"
,
netMask
:
"
255.255.255.0
"
,
dnsServers
:
"
1.1.1.1
"
,
dnsServers
:
"
1.1.1.1
"
,
domain
:
"
2.2.2.2
"
domain
:
"
2.2.2.2
"
...
...
zh-cn/application-dev/reference/apis/js-apis-net-sharing.md
浏览文件 @
708d65c3
...
@@ -194,7 +194,8 @@ startSharing(type: SharingIfaceType, callback: AsyncCallback\<void>): void
...
@@ -194,7 +194,8 @@ startSharing(type: SharingIfaceType, callback: AsyncCallback\<void>): void
```
js
```
js
import
SharingIfaceType
from
'
@ohos.net.sharing
'
import
SharingIfaceType
from
'
@ohos.net.sharing
'
sharing
.
startSharing
(
0
,
(
error
)
=>
{
let
SHARING_WIFI
=
0
;
sharing
.
startSharing
(
SHARING_WIFI
,
(
error
)
=>
{
console
.
log
(
JSON
.
stringify
(
error
));
console
.
log
(
JSON
.
stringify
(
error
));
});
});
```
```
...
@@ -242,7 +243,8 @@ startSharing(type: SharingIfaceType): Promise\<void>
...
@@ -242,7 +243,8 @@ startSharing(type: SharingIfaceType): Promise\<void>
```
js
```
js
import
SharingIfaceType
from
'
@ohos.net.sharing
'
import
SharingIfaceType
from
'
@ohos.net.sharing
'
sharing
.
startSharing
(
0
).
then
(()
=>
{
let
SHARING_WIFI
=
0
;
sharing
.
startSharing
(
SHARING_WIFI
).
then
(()
=>
{
console
.
log
(
"
start wifi sharing successful
"
);
console
.
log
(
"
start wifi sharing successful
"
);
}).
catch
(
error
=>
{
}).
catch
(
error
=>
{
console
.
log
(
"
start wifi sharing failed
"
);
console
.
log
(
"
start wifi sharing failed
"
);
...
@@ -285,7 +287,8 @@ stopSharing(type: SharingIfaceType, callback: AsyncCallback\<void>): void
...
@@ -285,7 +287,8 @@ stopSharing(type: SharingIfaceType, callback: AsyncCallback\<void>): void
```
js
```
js
import
SharingIfaceType
from
'
@ohos.net.sharing
'
import
SharingIfaceType
from
'
@ohos.net.sharing
'
sharing
.
stopSharing
(
0
,
(
error
)
=>
{
let
SHARING_WIFI
=
0
;
sharing
.
stopSharing
(
SHARING_WIFI
,
(
error
)
=>
{
console
.
log
(
JSON
.
stringify
(
error
));
console
.
log
(
JSON
.
stringify
(
error
));
});
});
```
```
...
@@ -331,7 +334,8 @@ stopSharing(type: SharingIfaceType): Promise\<void>
...
@@ -331,7 +334,8 @@ stopSharing(type: SharingIfaceType): Promise\<void>
```
js
```
js
import
SharingIfaceType
from
'
@ohos.net.sharing
'
import
SharingIfaceType
from
'
@ohos.net.sharing
'
sharing
.
stopSharing
(
0
).
then
(()
=>
{
let
SHARING_WIFI
=
0
;
sharing
.
stopSharing
(
SHARING_WIFI
).
then
(()
=>
{
console
.
log
(
"
stop wifi sharing successful
"
);
console
.
log
(
"
stop wifi sharing successful
"
);
}).
catch
(
error
=>
{
}).
catch
(
error
=>
{
console
.
log
(
"
stop wifi sharing failed
"
);
console
.
log
(
"
stop wifi sharing failed
"
);
...
@@ -584,7 +588,8 @@ getSharingIfaces(state: SharingIfaceState, callback: AsyncCallback\<Array\<strin
...
@@ -584,7 +588,8 @@ getSharingIfaces(state: SharingIfaceState, callback: AsyncCallback\<Array\<strin
```
js
```
js
import
SharingIfaceState
from
'
@ohos.net.sharing
'
import
SharingIfaceState
from
'
@ohos.net.sharing
'
sharing
.
getSharingIfaces
(
2
,
(
error
,
data
)
=>
{
let
SHARING_BLUETOOTH
=
2
;
sharing
.
getSharingIfaces
(
SHARING_BLUETOOTH
,
(
error
,
data
)
=>
{
console
.
log
(
JSON
.
stringify
(
error
));
console
.
log
(
JSON
.
stringify
(
error
));
console
.
log
(
JSON
.
stringify
(
data
));
console
.
log
(
JSON
.
stringify
(
data
));
});
});
...
@@ -628,7 +633,8 @@ getSharingIfaces(state: SharingIfaceState): Promise\<Array\<string>>
...
@@ -628,7 +633,8 @@ getSharingIfaces(state: SharingIfaceState): Promise\<Array\<string>>
```
js
```
js
import
SharingIfaceState
from
'
@ohos.net.sharing
'
import
SharingIfaceState
from
'
@ohos.net.sharing
'
sharing
.
getSharingIfaces
(
2
).
then
(
data
=>
{
let
SHARING_BLUETOOTH
=
2
;
sharing
.
getSharingIfaces
(
SHARING_BLUETOOTH
).
then
(
data
=>
{
console
.
log
(
JSON
.
stringify
(
data
));
console
.
log
(
JSON
.
stringify
(
data
));
}).
catch
(
error
=>
{
}).
catch
(
error
=>
{
console
.
log
(
JSON
.
stringify
(
error
));
console
.
log
(
JSON
.
stringify
(
error
));
...
@@ -668,7 +674,8 @@ getSharingState(type: SharingIfaceType, callback: AsyncCallback\<SharingIfaceSta
...
@@ -668,7 +674,8 @@ getSharingState(type: SharingIfaceType, callback: AsyncCallback\<SharingIfaceSta
```
js
```
js
import
SharingIfaceType
from
'
@ohos.net.sharing
'
import
SharingIfaceType
from
'
@ohos.net.sharing
'
sharing
.
getSharingState
(
0
,
(
error
,
data
)
=>
{
let
SHARING_WIFI
=
0
;
sharing
.
getSharingState
(
SHARING_WIFI
,
(
error
,
data
)
=>
{
console
.
log
(
JSON
.
stringify
(
error
));
console
.
log
(
JSON
.
stringify
(
error
));
console
.
log
(
JSON
.
stringify
(
data
));
console
.
log
(
JSON
.
stringify
(
data
));
});
});
...
@@ -712,7 +719,8 @@ getSharingState(type: SharingIfaceType): Promise\<SharingIfaceState>
...
@@ -712,7 +719,8 @@ getSharingState(type: SharingIfaceType): Promise\<SharingIfaceState>
```
js
```
js
import
SharingIfaceType
from
'
@ohos.net.sharing
'
import
SharingIfaceType
from
'
@ohos.net.sharing
'
sharing
.
getSharingState
(
0
).
then
(
data
=>
{
let
SHARING_WIFI
=
0
;
sharing
.
getSharingState
(
SHARING_WIFI
).
then
(
data
=>
{
console
.
log
(
JSON
.
stringify
(
data
));
console
.
log
(
JSON
.
stringify
(
data
));
}).
catch
(
error
=>
{
}).
catch
(
error
=>
{
console
.
log
(
JSON
.
stringify
(
error
));
console
.
log
(
JSON
.
stringify
(
error
));
...
@@ -752,7 +760,8 @@ getSharableRegexes(type: SharingIfaceType, callback: AsyncCallback\<Array\<strin
...
@@ -752,7 +760,8 @@ getSharableRegexes(type: SharingIfaceType, callback: AsyncCallback\<Array\<strin
```
js
```
js
import
SharingIfaceType
from
'
@ohos.net.sharing
'
import
SharingIfaceType
from
'
@ohos.net.sharing
'
sharing
.
getSharableRegexes
(
0
,
(
error
,
data
)
=>
{
let
SHARING_WIFI
=
0
;
sharing
.
getSharableRegexes
(
SHARING_WIFI
,
(
error
,
data
)
=>
{
console
.
log
(
JSON
.
stringify
(
error
));
console
.
log
(
JSON
.
stringify
(
error
));
console
.
log
(
JSON
.
stringify
(
data
));
console
.
log
(
JSON
.
stringify
(
data
));
});
});
...
@@ -796,7 +805,8 @@ getSharableRegexes(type: SharingIfaceType): Promise\<Array\<string>>
...
@@ -796,7 +805,8 @@ getSharableRegexes(type: SharingIfaceType): Promise\<Array\<string>>
```
js
```
js
import
SharingIfaceType
from
'
@ohos.net.sharing
'
import
SharingIfaceType
from
'
@ohos.net.sharing
'
sharing
.
getSharableRegexes
(
0
).
then
(
data
=>
{
let
SHARING_WIFI
=
0
;
sharing
.
getSharableRegexes
(
SHARING_WIFI
).
then
(
data
=>
{
console
.
log
(
JSON
.
stringify
(
data
));
console
.
log
(
JSON
.
stringify
(
data
));
}).
catch
(
error
=>
{
}).
catch
(
error
=>
{
console
.
log
(
JSON
.
stringify
(
error
));
console
.
log
(
JSON
.
stringify
(
error
));
...
...
zh-cn/application-dev/reference/apis/js-apis-socket.md
浏览文件 @
708d65c3
...
@@ -1813,7 +1813,7 @@ let options = {
...
@@ -1813,7 +1813,7 @@ let options = {
key
:
"
xxxx
"
,
key
:
"
xxxx
"
,
cert
:
"
xxxx
"
,
cert
:
"
xxxx
"
,
ca
:
[
"
xxxx
"
],
ca
:
[
"
xxxx
"
],
passwd
:
"
xxxx
"
,
passw
or
d
:
"
xxxx
"
,
protocols
:
[
socket
.
Protocol
.
TLSv12
],
protocols
:
[
socket
.
Protocol
.
TLSv12
],
useRemoteCipherPrefer
:
true
,
useRemoteCipherPrefer
:
true
,
signatureAlgorithms
:
"
rsa_pss_rsae_sha256:ECDSA+SHA256
"
,
signatureAlgorithms
:
"
rsa_pss_rsae_sha256:ECDSA+SHA256
"
,
...
@@ -1913,7 +1913,7 @@ let options = {
...
@@ -1913,7 +1913,7 @@ let options = {
key
:
"
xxxx
"
,
key
:
"
xxxx
"
,
cert
:
"
xxxx
"
,
cert
:
"
xxxx
"
,
ca
:
[
"
xxxx
"
],
ca
:
[
"
xxxx
"
],
passwd
:
"
xxxx
"
,
passw
or
d
:
"
xxxx
"
,
protocols
:
[
socket
.
Protocol
.
TLSv12
],
protocols
:
[
socket
.
Protocol
.
TLSv12
],
useRemoteCipherPrefer
:
true
,
useRemoteCipherPrefer
:
true
,
signatureAlgorithms
:
"
rsa_pss_rsae_sha256:ECDSA+SHA256
"
,
signatureAlgorithms
:
"
rsa_pss_rsae_sha256:ECDSA+SHA256
"
,
...
@@ -2515,7 +2515,7 @@ TLS安全相关操作,其中ca证书为必选参数,其他参数为可选参
...
@@ -2515,7 +2515,7 @@ TLS安全相关操作,其中ca证书为必选参数,其他参数为可选参
| ca | string
\|
Array
\<
string> | 是 | 服务端的ca证书,用于认证校验服务端的数字证书。|
| ca | string
\|
Array
\<
string> | 是 | 服务端的ca证书,用于认证校验服务端的数字证书。|
| cert | string | 否 | 本地客户端的数字证书。 |
| cert | string | 否 | 本地客户端的数字证书。 |
| key | string | 否 | 本地数字证书的私钥。 |
| key | string | 否 | 本地数字证书的私钥。 |
| passwd | string | 否 | 读取私钥的密码。 |
| passw
or
d | string | 否 | 读取私钥的密码。 |
| protocols |
[
Protocol
](
#protocol9
)
\|
Array
\<
[
Protocol
](
#protocol9
)
> | 否 | TLS的协议版本。 |
| protocols |
[
Protocol
](
#protocol9
)
\|
Array
\<
[
Protocol
](
#protocol9
)
> | 否 | TLS的协议版本。 |
| useRemoteCipherPrefer | boolean | 否 | 优先使用对等方的密码套件。 |
| useRemoteCipherPrefer | boolean | 否 | 优先使用对等方的密码套件。 |
| signatureAlgorithms | string | 否 | 通信过程中的签名算法。 |
| signatureAlgorithms | string | 否 | 通信过程中的签名算法。 |
...
@@ -2540,4 +2540,4 @@ TLS通信的协议版本。
...
@@ -2540,4 +2540,4 @@ TLS通信的协议版本。
| 类型 | 说明 |
| 类型 | 说明 |
| --------------------------------------------------------------------- | --------------------- |
| --------------------------------------------------------------------- | --------------------- |
|
[
cryptoFramework.EncodingBlob
](
js-apis-cryptoFramework.md#datablob
)
| 存储证书的数据和编码格式 |
|
[
cryptoFramework.EncodingBlob
](
js-apis-cryptoFramework.md#datablob
)
| 存储证书的数据和编码格式 |
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录