| | |
| | | public void channelRead(ChannelHandlerContext ctx, Object msg) { |
| | | InetSocketAddress insocket = (InetSocketAddress) ctx.channel().remoteAddress(); |
| | | if(isdebug) { |
| | | // System.err.println(insocket.getAddress() + ": 收到客户端数据......."); |
| | | System.err.println(insocket.getAddress() + ": 收到客户端数据......."); |
| | | } |
| | | try { |
| | | // 调用service |
| | |
| | | protected void channelRead0(ChannelHandlerContext ctx, String msg) throws Exception { |
| | | InetSocketAddress insocket = (InetSocketAddress) ctx.channel().remoteAddress(); |
| | | if(isdebug) { |
| | | // System.err.println(insocket.getAddress() + ": 收到客户端数据......."); |
| | | System.err.println(insocket.getAddress() + ": 收到客户端数据......."); |
| | | } |
| | | try { |
| | | // 调用service |
| | |
| | | public void channelActive(final ChannelHandlerContext ctx) throws Exception { |
| | | InetSocketAddress insocket = (InetSocketAddress) ctx.channel().remoteAddress(); |
| | | if(isdebug) { |
| | | // System.err.println(insocket.getAddress() + ": Connect successful......"); |
| | | System.err.println(insocket.getAddress() + ": Connect successful......"); |
| | | } |
| | | } |
| | | |