netty

发布时间 2024-01-12 14:51:49作者: Me无情

k.attachment();为什么就有值了 我们自己写的nioserversocketchannle 就是null 为啥 ???

safeExecute(task);

head->ServerBootstrapAcceptor->tail

①:java.nio.channels.spi.AbstractSelectableChannel#register
selectionKey = javaChannel().register(eventLoop().unwrappedSelector(), 0, this);

②:io.netty.channel.nio.NioEventLoop#select

③:io.netty.channel.socket.nio.NioServerSocketChannel#doReadMessages