Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
crossoverJie committed Oct 12, 2024
1 parent b0386e2 commit 1b03e3a
Showing 1 changed file with 22 additions and 22 deletions.
44 changes: 22 additions & 22 deletions cim-client-sdk/README.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@

```java
var auth1 = ClientConfigurationData.Auth.builder()
.userId(id)
.userName(cj)
.build();

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();
var auth1 = ClientConfigurationData.Auth.builder()
.userId(id)
.userName(cj)
.build();
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 1b03e3a

Please sign in to comment.