|
|
|
@ -1,6 +1,7 @@ |
|
|
|
package com.inspect.tcpserver.tcp; |
|
|
|
|
|
|
|
import io.netty.buffer.ByteBuf; |
|
|
|
import io.netty.buffer.ByteBufUtil; |
|
|
|
import io.netty.channel.ChannelHandlerContext; |
|
|
|
import io.netty.channel.ChannelInboundHandlerAdapter; |
|
|
|
import org.apache.tomcat.util.buf.HexUtils; |
|
|
|
@ -22,6 +23,8 @@ public class NettyServerHandler extends ChannelInboundHandlerAdapter { |
|
|
|
|
|
|
|
public void SendMsg(String id, ByteBuf byteBuf) { |
|
|
|
if (ids.containsKey(id)) { |
|
|
|
ByteBuf forPrint = byteBuf.copy(); |
|
|
|
logger.info("[NETTY] FULL MSG =>: [{}]", ByteBufUtil.hexDump(forPrint)); |
|
|
|
ids.get(id).writeAndFlush(byteBuf); |
|
|
|
} |
|
|
|
} |
|
|
|
|