MESSAGE_FRIEND, MESSAGE_GROUP, MESSAGE_SYSTEM, SESSION_USER| 构造器和说明 |
|---|
HimUtil() |
| 限定符和类型 | 方法和说明 |
|---|---|
static void |
addGroup(com.corundumstudio.socketio.SocketIOClient client,
String groupId)
将当前用户加入群聊
|
static HimUserInfo |
getUserInfo(com.corundumstudio.socketio.SocketIOClient client)
获得当前客户端的用户对象
|
static void |
removeGroup(com.corundumstudio.socketio.SocketIOClient client,
String groupId)
将当前用户移出群聊
|
static void |
send(String groupId,
String eventName,
Object data)
通用消息发送方法
|
static void |
send(UUID sessionID,
String eventName,
Object data)
通用消息发送方法
|
static void |
sendFriend(HimUserInfo user,
HimUserInfo friend,
String message)
发送消息给指定用户
|
static void |
sendFriend(com.corundumstudio.socketio.SocketIOClient client,
HimUserInfo friend,
String message)
发送消息给指定用户
|
static void |
sendGroup(HimUserInfo user,
String groupId,
String message)
发送消息到指定群
|
static void |
sendGroup(com.corundumstudio.socketio.SocketIOClient client,
String groupId,
String message)
发送消息到指定群
|
static void |
sendSystem(HimUserInfo user,
String message,
Object data)
发送系统消息给指定用户
|
static void |
sendSystem(String message)
发送系统消息给所有用户
|
static void |
sendSystem(String message,
Object data)
发送系统消息给所有用户
|
void |
setServer(com.corundumstudio.socketio.SocketIOServer server) |
public void setServer(com.corundumstudio.socketio.SocketIOServer server)
public static HimUserInfo getUserInfo(com.corundumstudio.socketio.SocketIOClient client)
client - 客户端对象public static void send(String groupId, String eventName, Object data)
groupId - 群IDeventName - 事件名称data - 数据对象public static void send(UUID sessionID, String eventName, Object data)
sessionID - 接收方用户SessionIDeventName - 事件名称data - 数据对象public static void sendFriend(com.corundumstudio.socketio.SocketIOClient client,
HimUserInfo friend,
String message)
client - 客户端对象friend - 接收方用户信息message - 消息内容public static void sendFriend(HimUserInfo user, HimUserInfo friend, String message)
user - 发送方用户信息friend - 接收方用户信息message - 消息内容public static void sendGroup(com.corundumstudio.socketio.SocketIOClient client,
String groupId,
String message)
client - 客户端对象groupId - 群IDmessage - 消息内容public static void sendGroup(HimUserInfo user, String groupId, String message)
user - 发送方用户信息groupId - 群IDmessage - 消息内容public static void sendSystem(String message)
message - 消息内容public static void sendSystem(String message, Object data)
message - 提示信息data - 数据对象public static void sendSystem(HimUserInfo user, String message, Object data)
user - 接收方用户对象信息message - 消息内容data - 数据对象public static void addGroup(com.corundumstudio.socketio.SocketIOClient client,
String groupId)
client - 客户端对象groupId - 群IDpublic static void removeGroup(com.corundumstudio.socketio.SocketIOClient client,
String groupId)
client - 客户端对象groupId - 群IDCopyright © 2019. All rights reserved.