Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
crossoverJie committed Oct 11, 2024
1 parent a5f63a2 commit b2cb341
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 4 deletions.
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,11 @@ Using `CIM`, you can achieve the following requirements:

![](pic/architecture.png)

- `CIM` 中的各个组件均采用 `SpringBoot` 构建。
- 采用 `Netty` 构建底层通信。
- `Redis` 存放各个客户端的路由信息、账号信息、在线状态等。
- `Zookeeper` 用于 `IM-server` 服务的注册与发现。
translate to english
- Each component in `CIM` is built using `SpringBoot`
- Client build with [cim-client-sdk](https://github.com/crossoverJie/cim/tree/master/cim-client-sdk)
- Use `Netty` to build the underlying communication.
- `MetaStore` is used for registration and discovery of `IM-server` services.


### cim-server
Expand Down
20 changes: 20 additions & 0 deletions cim-client-sdk/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@

```java
Client client1 = Client.builder()
.auth(auth1)
.routeUrl(routeUrl)
.build();

ClientState.State state = client1.getState();
Awaitility.await().atMost(10, TimeUnit.SECONDS)
.untilAsserted(() -> Assertions.assertEquals(ClientState.State.Ready, state));
Optional<CIMServerResVO> serverInfo = client1.getServerInfo();
Assertions.assertTrue(serverInfo.isPresent());

// send msg
String msg = "hello";
client1.sendGroup(msg);

// get oline user
Set<CIMUserInfo> onlineUser = client1.getOnlineUser();
```

0 comments on commit b2cb341

Please sign in to comment.