diff --git a/README.md b/README.md index 5ac87325..d4926106 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/cim-client-sdk/README.md b/cim-client-sdk/README.md new file mode 100644 index 00000000..b2c13011 --- /dev/null +++ b/cim-client-sdk/README.md @@ -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 serverInfo = client1.getServerInfo(); +Assertions.assertTrue(serverInfo.isPresent()); + +// send msg +String msg = "hello"; +client1.sendGroup(msg); + +// get oline user +Set onlineUser = client1.getOnlineUser(); +``` \ No newline at end of file