| | |
| | | package com.sinata.push.util.echo; |
| | | |
| | | import com.sinata.push.util.SpringUtil; |
| | | import io.netty.buffer.Unpooled; |
| | | import io.netty.channel.ChannelHandlerContext; |
| | | import io.netty.channel.ChannelPromise; |
| | |
| | | import io.netty.handler.timeout.IdleState; |
| | | import io.netty.handler.timeout.IdleStateEvent; |
| | | import io.netty.util.ReferenceCountUtil; |
| | | import org.springframework.data.redis.core.RedisTemplate; |
| | | |
| | | import java.net.InetSocketAddress; |
| | | import java.util.HashMap; |
| | | |
| | | public class DiscardServerHandler extends SimpleChannelInboundHandler<String> { |
| | | |
| | | private NettyServerController nettyServerController = SpringUtil.getObject(NettyServerController.class); |
| | | private NettyServerController nettyServerController = new NettyServerController(); |
| | | |
| | | public static boolean isdebug = true; |
| | | |
| | |
| | | // System.err.println(insocket.getAddress() + ": Disconnect connection......"); |
| | | } |
| | | NettyChannelMap.remove(ctx); |
| | | System.err.println("清除通道" + ctx); |
| | | // System.err.println("清除通道" + ctx); |
| | | // super.channelInactive(ctx); |
| | | } |
| | | |