Commit 9a2856ee by Future

日志打印

parent 0206ee9e
......@@ -67,6 +67,7 @@ public class ChannelInboundHandler extends ChannelInboundHandlerAdapter {
log.info("连接的客户端地址:{}", ctx.channel().remoteAddress());
}
ctx.writeAndFlush("客户端" + InetAddress.getLocalHost().getHostName() + "成功与服务端建立连接! ");
log.info("连接成功 {},clientId {}", ctx.channel().remoteAddress(),ctx.channel().attr(ChannelManager.CLIENT_ID).get());
super.channelActive(ctx);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment