File tree 2 files changed +25
-4
lines changed
2 files changed +25
-4
lines changed Original file line number Diff line number Diff line change @@ -71,10 +71,11 @@ Using `CIM`, you can achieve the following requirements:
71
71
72
72
![ ] ( pic/architecture.png )
73
73
74
- - ` CIM ` 中的各个组件均采用 ` SpringBoot ` 构建。
75
- - 采用 ` Netty ` 构建底层通信。
76
- - ` Redis ` 存放各个客户端的路由信息、账号信息、在线状态等。
77
- - ` Zookeeper ` 用于 ` IM-server ` 服务的注册与发现。
74
+ translate to english
75
+ - Each component in ` CIM ` is built using ` SpringBoot `
76
+ - Client build with [ cim-client-sdk] ( https://github.com/crossoverJie/cim/tree/master/cim-client-sdk )
77
+ - Use ` Netty ` to build the underlying communication.
78
+ - ` MetaStore ` is used for registration and discovery of ` IM-server ` services.
78
79
79
80
80
81
### cim-server
Original file line number Diff line number Diff line change
1
+
2
+ ``` java
3
+ Client client1 = Client . builder()
4
+ .auth(auth1)
5
+ .routeUrl(routeUrl)
6
+ .build();
7
+
8
+ ClientState . State state = client1. getState();
9
+ Awaitility . await(). atMost(10 , TimeUnit . SECONDS )
10
+ .untilAsserted(() - > Assertions . assertEquals(ClientState . State . Ready , state));
11
+ Optional<CIMServerResVO > serverInfo = client1. getServerInfo();
12
+ Assertions . assertTrue(serverInfo. isPresent());
13
+
14
+ // send msg
15
+ String msg = " hello" ;
16
+ client1. sendGroup(msg);
17
+
18
+ // get oline user
19
+ Set<CIMUserInfo > onlineUser = client1. getOnlineUser();
20
+ ```
You can’t perform that action at this time.
0 commit comments