mirror of
https://github.com/tiennm99/zfoo.git
synced 2026-10-11 03:13:51 +00:00
chore: update README
This commit is contained in:
1 parent
4f36201c38
commit
3970dbfa35
2 files changed
+8
-14
No files matched your search
@@ -57,8 +57,6 @@ Perfect work development process, complete online solution
|
||||
- [zfoo sdk of csharp and lua for unity and godot](https://github.com/zfoo-project/zfoo-sdk-csharp-lua-unity-godot)
|
||||
- [zfoo sdk typescript javascript cocos web h5](https://github.com/zfoo-project/zfoo-sdk-typescript-javascript-cocos-web-h5)
|
||||
- [zfoo sdk gdscript for godot](https://github.com/zfoo-project/zfoo-sdk-gdscript-godot)
|
||||
- [jc-site](https://github.com/zfoo-project/jc-site) AI website
|
||||
- [tank-game-server](https://github.com/zfoo-project/tank-game-server)
|
||||
- [godot-bird](https://github.com/zfoo-project/godot-bird) bird and bird,powered by godot
|
||||
- [FAQ](./doc/FAQ.md),There are standard demo display and instructions in the test folder of each project directory,
|
||||
which can be run directly
|
||||
@@ -88,12 +86,12 @@ public void atUserInfoAsk(Session session, UserInfoAsk ask) {
|
||||
}
|
||||
|
||||
// Consumers, synchronously requesting remote service, will block the current thread
|
||||
var userInfoAsk = UserInfoAsk.valueOf(userId);
|
||||
var answer = NetContext.getCosumer().syncAsk(userInfoAsk, UserInfoAnswer.class, userId).packet();
|
||||
var ask = UserInfoAsk.valueOf(userId);
|
||||
var answer = NetContext.getCosumer().syncAsk(ask, UserInfoAnswer.class, userId).packet();
|
||||
|
||||
// Consumers, asynchronously requesting remote service, and will still execute logic in the current thread after the asynchronous
|
||||
NetContext.getCosumer().asyncAsk(userInfoAsk, UserInfoAnswer.class, userId)
|
||||
.whenComplete(sm -> {
|
||||
NetContext.getCosumer().asyncAsk(ask, UserInfoAnswer.class, userId)
|
||||
.whenComplete(answer -> {
|
||||
// do something
|
||||
);
|
||||
```
|
||||
|
||||
+4
-8
@@ -62,10 +62,6 @@
|
||||
|
||||
- [zfoo sdk gdscript for godot](https://github.com/zfoo-project/zfoo-sdk-gdscript-godot)
|
||||
|
||||
- [jc-site](https://github.com/zfoo-project/jc-site) AI聚合网站
|
||||
|
||||
- [tank-game-server](https://github.com/zfoo-project/tank-game-server)
|
||||
|
||||
- [godot-bird](https://github.com/zfoo-project/godot-bird) 鸟了个鸟,客户端使用godot开发,服务器依然使用的tank-game-server
|
||||
|
||||
|
||||
@@ -94,12 +90,12 @@ public void atUserInfoAsk(Session session, UserInfoAsk ask) {
|
||||
}
|
||||
|
||||
// 消费者,同步请求远程用户信息,会阻塞当前的线程,慎重考虑使用同步请求
|
||||
var userInfoAsk = UserInfoAsk.valueOf(userId);
|
||||
var answer = NetContext.getCosumer().syncAsk(userInfoAsk, UserInfoAnswer.class, userId).packet();
|
||||
var ask = UserInfoAsk.valueOf(userId);
|
||||
var answer = NetContext.getCosumer().syncAsk(ask, UserInfoAnswer.class, userId).packet();
|
||||
|
||||
// 消费者,异步请求远程用户信息,不会柱塞当前的线程,异步请求成功过后依然会在当前线程执行逻辑
|
||||
NetContext.getCosumer().asyncAsk(userInfoAsk, UserInfoAnswer.class, userId)
|
||||
.whenComplete(sm -> {
|
||||
NetContext.getCosumer().asyncAsk(ask, UserInfoAnswer.class, userId)
|
||||
.whenComplete(answer -> {
|
||||
// do something
|
||||
);
|
||||
```
|
||||
|
||||
Reference in new issue
Block a user