Overview
Jocloud offers various client SDKs for you to connect to a global real-time network (RTN) for stable, reliable instant messaging services with high concurrency and ultra-low latency, helping you to create service scenarios quickly.
Jocloud’s mobile-specific instant messaging SDK code is Hummer
.
- Core offers SDK initialization login and configuration functions.
- ChatRoom Service offers an API for chatroom management.
- MessageService offers a channel for sending public screen, unicast and broadcast signaling messages.
Basic Functions
Callback | Description |
void | onStateCallback(void *context, bool isInitial, HMRState oldState, HMRState newState) |
void | onTokenInvalidCallback(void *context, HMRTokenInvalidCode code, const char *desc, int descsize) |
Chatroom Management
API | Description |
void | HMRCreateChatRoom(HMRCompletion completion) |
void | HMRCreateChatRoomWithInfo(HMRKvArray *info, HMRCompletion completion) |
void | HMRJoinChatRoom(uint64_t roomId, HMRCompletion completion) |
void | HMRJoinChatRoomWithMultiCheck(uint64_t roomId, bool isCheckMultiJoin, HMRCompletion completion) |
void | HMRJoinChatRoomWithConfigs(uint64_t roomId, const HMRKvItem *joinProps, int numerOfProperty, HMRCompletion completion) |
void | HMRLeaveChatRoom(uint64_t roomId, HMRCompletion completion) |
void | HMRChatRoomChangeBasicInfo:(uint64_t roomId, HMRCompletion completion) |
void | HMRChatRoomChangeBasicInfo(uint64_t roomId, HMRKvArray *info, HMRCompletion completion) |
void | HMRAddChatRoomListener(HMRChatRoomListener *listener) |
void | HMRRemoveChatRoomListener(HMRChatRoomListener *listener) |
HMRIdentity | HMRMakeChatRoomIdentity(uint64_t roomId) |
HMRCode | HMRExtractChatRoomId(HMRIdentity identity, uint64_t *roomId) |
bool | HMRIsChatRoom(HMRIdentity identity) |
Callback | Description |
void | onBasicInfoChanged(void *context, uint32_t chatroom, uint64_t operatorUser, const HMRKvArray *info) |
Chatroom Member Management
Callback | Description |
void | onMemberJoined(void *context, uint32_t chatroom, const uint64_t *users, uint16_t usersize) |
void | onMemberLeaved(void *context, uint32_t chatroom, const uint64_t *users, uint16_t usersize) |
void | onMemberCountChanged(void *context, uint32_t chatroom, uint32_t count) |
void | onMemberKicked(void *context, uint32_t chatroom, uint64_t admin, const uint64_t *member, uint16_t membersize, const char *reason) |
void | onUserInfoSet(void *context, uint32_t chatroom, uint64_t user, const HMRKvArray *infos) |
Message Channel
Callback | Description |
void | beforeSending(void *context, HMRMessage *message) |
void | afterSending(void *context, HMRMessage *message) |
void | onReceive(void *context, HMRMessage *message) |