Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Docs
提交
4237d598
D
Docs
项目概览
OpenHarmony
/
Docs
大约 1 年 前同步成功
通知
159
Star
292
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看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
4237d598
编写于
6月 07, 2022
作者:
O
openharmony_ci
提交者:
Gitee
6月 07, 2022
浏览文件
操作
浏览文件
下载
差异文件
!5007 Rpc 文档更新
Merge pull request !5007 from pilipala195/master
上级
adb87681
43bde386
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
23 addition
and
19 deletion
+23
-19
zh-cn/application-dev/reference/apis/js-apis-rpc.md
zh-cn/application-dev/reference/apis/js-apis-rpc.md
+23
-19
未找到文件。
zh-cn/application-dev/reference/apis/js-apis-rpc.md
浏览文件 @
4237d598
...
...
@@ -78,7 +78,7 @@ writeRemoteObject(object: [IRemoteObject](#iremoteobject)): boolean
```
class MyDeathRecipient {
onRemoteDied() {
console.log("server
is
died");
console.log("server died");
}
}
class TestRemoteObject extends rpc.RemoteObject {
...
...
@@ -119,7 +119,7 @@ readRemoteObject(): IRemoteObject
```
class MyDeathRecipient {
onRemoteDied() {
console.log("server
is
died");
console.log("server died");
}
}
class TestRemoteObject extends rpc.RemoteObject {
...
...
@@ -1698,7 +1698,7 @@ writeNoException(): void
```
class MyDeathRecipient {
onRemoteDied() {
console.log("server
is
died");
console.log("server died");
}
}
class TestRemoteObject extends rpc.RemoteObject {
...
...
@@ -1901,7 +1901,7 @@ writeRemoteObjectArray(objectArray: IRemoteObject[]): boolean
```
class MyDeathRecipient {
onRemoteDied() {
console.log("server
is
died");
console.log("server died");
}
}
class TestRemoteObject extends rpc.RemoteObject {
...
...
@@ -1947,7 +1947,7 @@ readRemoteObjectArray(objects: IRemoteObject[]): void
```
class MyDeathRecipient {
onRemoteDied() {
console.log("server
is
died");
console.log("server died");
}
}
class TestRemoteObject extends rpc.RemoteObject {
...
...
@@ -1994,7 +1994,7 @@ readRemoteObjectArray(): IRemoteObject[]
```
class MyDeathRecipient {
onRemoteDied() {
console.log("server
is
died");
console.log("server died");
}
}
class TestRemoteObject extends rpc.RemoteObject {
...
...
@@ -2456,7 +2456,7 @@ onRemoteDied(): void
```
class MyDeathRecipient {
onRemoteDied() {
console.log("server
is
died");
console.log("server died");
}
}
```
...
...
@@ -2931,7 +2931,7 @@ addDeathRecipient(recipient : DeathRecipient, flags : number): boolean
FA.connectAbility(want, connect);
class MyDeathRecipient {
onRemoteDied() {
console.log("server
is
died");
console.log("server died");
}
}
let deathRecipient = new MyDeathRecipient();
...
...
@@ -2982,7 +2982,7 @@ removeDeathRecipient(recipient : DeathRecipient, flags : number): boolean
FA.connectAbility(want, connect);
class MyDeathRecipient {
onRemoteDied() {
console.log("server
is
died");
console.log("server died");
}
}
let deathRecipient = new MyDeathRecipient();
...
...
@@ -3362,7 +3362,7 @@ static flushCommands(object : IRemoteObject): number
```
class MyDeathRecipient {
onRemoteDied() {
console.log("server
is
died");
console.log("server died");
}
}
class TestRemoteObject extends rpc.RemoteObject {
...
...
@@ -3497,7 +3497,7 @@ sendRequest(code : number, data : MessageParcel, reply : MessageParcel, options
```
class MyDeathRecipient {
onRemoteDied() {
console.log("server
is
died");
console.log("server died");
}
}
class TestRemoteObject extends rpc.RemoteObject {
...
...
@@ -3561,7 +3561,7 @@ sendRequest(code : number, data : MessageParcel, reply : MessageParcel, options
```
class MyDeathRecipient {
onRemoteDied() {
console.log("server
is
died");
console.log("server died");
}
}
class TestRemoteObject extends rpc.RemoteObject {
...
...
@@ -3627,7 +3627,7 @@ sendRequest(code: number, data: MessageParcel, reply: MessageParcel, options: Me
```
class MyDeathRecipient {
onRemoteDied() {
console.log("server
is
died");
console.log("server died");
}
}
class TestRemoteObject extends rpc.RemoteObject {
...
...
@@ -3694,7 +3694,7 @@ sendRequest请求的响应处理函数,服务端在该函数里处理请求,
```
class MyDeathRecipient {
onRemoteDied() {
console.log("server
is
died");
console.log("server died");
}
}
class TestRemoteObject extends rpc.RemoteObject {
...
...
@@ -3743,7 +3743,7 @@ getCallingUid(): number
```
class MyDeathRecipient {
onRemoteDied() {
console.log("server
is
died");
console.log("server died");
}
}
class TestRemoteObject extends rpc.RemoteObject {
...
...
@@ -3784,7 +3784,7 @@ getCallingPid(): number
```
class MyDeathRecipient {
onRemoteDied() {
console.log("server
is
died");
console.log("server died");
}
}
class TestRemoteObject extends rpc.RemoteObject {
...
...
@@ -3830,7 +3830,7 @@ queryLocalInterface(descriptor: string): IRemoteBroker
```
class MyDeathRecipient {
onRemoteDied() {
console.log("server
is
died");
console.log("server died");
}
}
class TestRemoteObject extends rpc.RemoteObject {
...
...
@@ -3871,7 +3871,7 @@ getInterfaceDescriptor(): string
```
class MyDeathRecipient {
onRemoteDied() {
console.log("server
is
died");
console.log("server died");
}
}
class TestRemoteObject extends rpc.RemoteObject {
...
...
@@ -3914,7 +3914,7 @@ attachLocalInterface(localInterface: IRemoteBroker, descriptor: string): void
```
class MyDeathRecipient {
onRemoteDied() {
console.log("server
is
died");
console.log("server died");
}
}
class TestRemoteObject extends rpc.RemoteObject {
...
...
@@ -4189,6 +4189,8 @@ writeToAshmem(buf: number[], size: number, offset: number): boolean
```
let ashmem = rpc.Ashmem.createAshmem("ashmem", 1024*1024);
let mapResult = ashmem.mapReadAndWriteAshmem();
console.info("RpcTest map ashmem result is " + mapResult);
var ByteArrayVar = [1, 2, 3, 4, 5];
let writeResult = ashmem.writeToAshmem(ByteArrayVar, 5, 0);
console.log("RpcTest: write to Ashmem result is : " + writeResult);
...
...
@@ -4219,6 +4221,8 @@ readFromAshmem(size: number, offset: number): number[]
```
let ashmem = rpc.Ashmem.createAshmem("ashmem", 1024*1024);
let mapResult = ashmem.mapReadAndWriteAshmem();
console.info("RpcTest map ashmem result is " + mapResult);
var ByteArrayVar = [1, 2, 3, 4, 5];
let writeResult = ashmem.writeToAshmem(ByteArrayVar, 5, 0);
console.log("RpcTest: write to Ashmem result is : " + writeResult);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录