netty
追梦的程序猿
一天一点点
展开
-
Java 使用 Netty DefaultFullHttpRequest 实现Post发送数据包的功能
// 向SQLMAPAPI传送开始测试的指令 NioEventLoopGroup workerGroup = new NioEventLoopGroup(); try { Bootstrap bootstrap = new Bootstrap(); bootstrap.group(workerGroup).channel(NioSocketChannel.class).o...原创 2019-08-20 11:21:38 · 7171 阅读 · 0 评论 -
Java 使用Netty出现IllegalReferenceCountException的处理方法
简单来说,出现 IllegalReferenceCountException refCnt: 0 的原因是FullHttpRequest 对象已经被 writeAndFlush 方法释放,refCnt计数被置为0解决方案:FullHttpRequest beyondCommissionRequest = this.request.copy(); //复制request对象用于测试,防止r...原创 2019-08-21 10:55:21 · 611 阅读 · 0 评论 -
Java使用Netty消息聚合器实现Http响应聚合功能
public class SendRequest extends Thread{ private String host; private int port; private String url; SendRequest(String host,int port, String url){ this.host = host; this.port = port; th...原创 2019-09-10 15:41:03 · 1015 阅读 · 0 评论