随笔分类 - java
摘要:@Slf4j public class NettyClientTest { public static void main(String[] args) throws Exception { EventLoopGroup workerEventLoopGroup = new NioEventLoop
阅读全文
摘要:# 假设pipeline里面有这样的handler顺序 OutBoundHandler1 InBoundHandler1 OutBoundHandler2 InBoundHandler2 当在【InBoundHandler1】里面执行【ctx.write()】时 向上执行触发【OutBoundHan
阅读全文
摘要:服务端和客户端的共用代码 【ConnectionInfo.java】 @Getter @Setter public class ConnectionInfo { private StringBuffer readBuffer = new StringBuffer(); private AtomicI
阅读全文
摘要:pipeline // out handler socketChannel.pipeline().addLast(new StringEncoder()); // in handler socketChannel.pipeline().addLast(new StringDecoder()); so
阅读全文
摘要:pipeline,注意out handler要在in handler之前 // out handler socketChannel.pipeline().addLast(new StringEncoder()); socketChannel.pipeline().addLast(new MyServ
阅读全文
摘要:添加依赖 <dependency> <groupId>io.netty</groupId> <artifactId>netty-all</artifactId> <version>4.1.110.Final</version> </dependency> <dependency> <groupId>
阅读全文

浙公网安备 33010602011771号