package com.cyksj.server;

public class SendMessageUtil {

    public static void sendMessage(Long userId, Object message) {
        //对话模型
//        Integer isMobile  = RedisUtil.getCacheObject(CommonConst.USER_CLIENT + userId);
        Integer isMobile = null;
        //默认不实时
        if(null == isMobile){
            isMobile = 0;
        }
        if (isMobile == 1) {
//            try {
//                WebSocketServer.sendInfo(userId, message);
//            } catch (IOException e) {
//                throw new RuntimeException(e);
//            }
        } else {
            SseEmitterServer.sendMessage(userId, message);
        }
    }
}
