|
...
|
...
|
@@ -3,6 +3,7 @@ package com.crossoverjie.cim.client.handle; |
|
|
|
import com.crossoverjie.cim.client.util.SpringBeanFactory;
|
|
|
|
import com.crossoverjie.cim.common.protocol.CIMRequestProto;
|
|
|
|
import com.crossoverjie.cim.common.protocol.CIMResponseProto;
|
|
|
|
import io.netty.channel.ChannelFutureListener;
|
|
|
|
import io.netty.channel.ChannelHandler;
|
|
|
|
import io.netty.channel.ChannelHandlerContext;
|
|
|
|
import io.netty.channel.SimpleChannelInboundHandler;
|
|
...
|
...
|
@@ -39,7 +40,7 @@ public class CIMClientHandle extends SimpleChannelInboundHandler<CIMResponseProt |
|
|
|
if (idleStateEvent.state() == IdleState.WRITER_IDLE){
|
|
|
|
CIMRequestProto.CIMReqProtocol heartBeat = SpringBeanFactory.getBean("heartBeat",
|
|
|
|
CIMRequestProto.CIMReqProtocol.class);
|
|
|
|
ctx.writeAndFlush(heartBeat) ;
|
|
|
|
ctx.writeAndFlush(heartBeat).addListeners(ChannelFutureListener.CLOSE_ON_FAILURE) ;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
...
|
...
|
|