Overview

Jocloud offers various client SDKs. A global real-time network (RTN) is connected through the SDK to provide RTS (Real-Time Signaling) with stable and reliable quality, high concurrency and ultra-low latency for developers, helping rapidly create a service scenario.

The code of the IM service SDK specific to Jocloud PC end is Hummer.

  • The hmr API class provides SDKs initialized login and configuration functions.
  • The hmr::rts::PeerService API class provides capabilities of sending P2P messages and searching user online statuses.
  • The hmr::rts::RoomService API class provides capabilities of managing rooms and room members.

Basic APIs

APIFunction
initInitialize Hummer and start listening to Hummer status change
getSDKVersionGet Hummer version
loginLog in an SDK
logoutLog out an SDK
getStateGet the current status of a HummerSDK
refreshTokenRefresh a user token
setLoggerFilePathDirectory of the log root path
CallbackFunction
onHummerLoginCallback of Hummer login results
onRefreshTokenCallback of refreshing results of a user token
NotificationFunction
onHummerStateChangedNotification of SDK status change
onHummerKickedNotification received by the SDK of removal due to repeated logins
onHummerPreviousTokenExpiredNotification of a user token expired

P2P Messages and User Status

APIFunction
addEventHandlerAdd listeners for signaling messages
removeEventHandlerRemove listeners for signaling messages
sendMessageSend P2P signaling messages
queryUserOnlineStatusBatch search of user online status for indicating the status of specific users
CallbackFunction
onSendMessageThis event triggers the callback of sending P2P signaling messages.
onQueryUserOnlineStatusCallback of the batch search result of online users
NotificationFunction
onPeerMessageReceivedNotification for this event will be received upon receipt of P2P signaling messages

Room Management

APIFunction
sendMessageSend room messages
addRoomEventHandlerAdd room listeners
removeRoomEventHandlerRemove room listeners
setRoomAttributesSet room profiles (full configuration of room profiles is supported for joining and exiting a room)
addOrUpdateRoomAttributesUpdate profiles of a specific room: update profiles while the profiles exist; otherwise, add profiles.
deleteRoomAttributesDelete specific profiles of specific rooms
clearRoomAttributesClear profiles of specific rooms
queryRoomAttributesSearch all profiles of specific rooms
queryRoomAttributesByKeysSearch specific profiles of specific rooms
queryMemberCountsBatch search of the number of room members
queryMembersSearch the list of room members
CallbackFunction
onQueryMembersCallback of the result of searching room members
onQueryMemberCountsCallback of the result of searching the list of room members
onSendMessageCallback of the result of sending room messages
onSetRoomAttributesCallback of the result of setting room profiles
onAddOrUpdateRoomAttributesCallback of the result of adding or updating profiles of specific rooms
onDeleteRoomAttributesCallback of the result of deleting room profiles
onClearRoomAttributesCallback of the result of clearing all room profiles
onQueryRoomAttributesCallback of the result of searching all room profiles
onQueryRoomAttributesByKeysCallback of the result of searching specific room profiles
NotificationFunction
onRoomMessageReceivedWhen you send a signaling message to a room, all members in this room will receive a notification of this event.
onRoomAttributesSetNotification of setting room profiles
onRoomAttributesDeletedNotification of deleting room profiles
onRoomAttributesClearedNotification of clearing room profiles
onRoomAttributesAddedOrUpdatedNotification of adding or updating room profiles

Room Member Management

APIFunction
joinRoomAPIs for joining a room
leaveRoomAPIs for exiting a room
addMemberEventHandlerAdd listeners for member events
removeMemberEventHandlerRemove listeners for members
setMemberAttributesSet user information in the current room
addOrUpdateMemberAttributesAdd or update user information in the current room
deleteMemberAttributesDelete specific user information in the current room
clearMemberAttributesDelete all user information in the current room
queryMemberAttributesSearch all user profiles in the current room
queryMemberAttributesByKeysSearch specific user profiles in the room
CallbackFunction
onJoinRoomCallback of the result of joining a room
onLeaveRoomCallback of the result of exiting a room
onSetMemberAttributesCallback of the result of setting room member profiles
onAddOrUpdateMemberAttributesCallback of the result of updating room member profiles
onClearMemberAttributesCallback of the result of clearing all user profiles in the room
onDeleteMemberAttributesCallback of the result of deleting room member profiles
onQueryMemberAttributesCallback of the result of searching all room member profiles
onQueryMemberAttributesByKeysCallback of the result of searching specific room member profiles
NotificationFunction
onRoomMemberJoinedNotification of members joining a room
onRoomMemberLeftNotification of members exiting a room
onRoomMemberOfflineNotification of the current user exited the room due to disconnection timeout
onRoomMemberCountChangedNotification of number change of room members
onRoomMemberAttributesSetCallback notification of setting room member information
onRoomMemberAttributesDeletedCallback notification of deleting room member information
onRoomMemberAttributesClearedCallback notification of clearing room member information
onRoomMemberAttributesAddedOrUpdatedCallback notification of adding or updating room member information
<