|
|
|
package com.crossoverjie.cim.server.handle;
|
|
|
|
|
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
|
import com.crossoverjie.cim.common.constant.Constants;
|
|
|
|
import com.crossoverjie.cim.common.exception.CIMException;
|
|
...
|
...
|
@@ -64,9 +63,6 @@ public class CIMServerHandle extends SimpleChannelInboundHandler<CIMRequestProto |
|
|
|
|
|
|
|
LOGGER.info("定时检测服务端是否存活");
|
|
|
|
|
|
|
|
Thread thread = Thread.currentThread();
|
|
|
|
LOGGER.info("当前线程信息={}===={}",thread.getClass(), JSON.toJSONString(thread));
|
|
|
|
|
|
|
|
HeartBeatHandler heartBeatHandler = SpringBeanFactory.getBean(ServerHeartBeatHandlerImpl.class) ;
|
|
|
|
heartBeatHandler.process(ctx) ;
|
|
|
|
}
|
|
...
|
...
|
@@ -124,7 +120,6 @@ public class CIMServerHandle extends SimpleChannelInboundHandler<CIMRequestProto |
|
|
|
protected void channelRead0(ChannelHandlerContext ctx, CIMRequestProto.CIMReqProtocol msg) throws Exception {
|
|
|
|
LOGGER.info("收到msg={}", msg.toString());
|
|
|
|
Thread thread = Thread.currentThread();
|
|
|
|
LOGGER.info("正常当前线程信息={}===={}",thread.getClass(), JSON.toJSONString(thread));
|
|
|
|
|
|
|
|
if (msg.getType() == Constants.CommandType.LOGIN) {
|
|
|
|
//保存客户端与 Channel 之间的关系
|
...
|
...
|
|