|
...
|
...
|
@@ -61,7 +61,7 @@ public class CIMServer { |
|
|
|
|
|
|
|
ChannelFuture future = bootstrap.bind().sync();
|
|
|
|
if (future.isSuccess()) {
|
|
|
|
LOGGER.info("启动 cim server 成功");
|
|
|
|
LOGGER.info("Start cim server success!!!");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
...
|
...
|
@@ -85,7 +85,7 @@ public class CIMServer { |
|
|
|
NioSocketChannel socketChannel = SessionSocketHolder.get(sendMsgReqVO.getUserId());
|
|
|
|
|
|
|
|
if (null == socketChannel) {
|
|
|
|
throw new NullPointerException("客户端[" + sendMsgReqVO.getUserId() + "]不在线!");
|
|
|
|
LOGGER.error("client {} offline!", sendMsgReqVO.getUserId());
|
|
|
|
}
|
|
|
|
CIMRequestProto.CIMReqProtocol protocol = CIMRequestProto.CIMReqProtocol.newBuilder()
|
|
|
|
.setRequestId(sendMsgReqVO.getUserId())
|
|
...
|
...
|
@@ -95,6 +95,6 @@ public class CIMServer { |
|
|
|
|
|
|
|
ChannelFuture future = socketChannel.writeAndFlush(protocol);
|
|
|
|
future.addListener((ChannelFutureListener) channelFuture ->
|
|
|
|
LOGGER.info("服务端手动发送 Google Protocol 成功={}", sendMsgReqVO.toString()));
|
|
|
|
LOGGER.info("server push msg:[{}]", sendMsgReqVO.toString()));
|
|
|
|
}
|
|
|
|
} |
...
|
...
|
|