摘要:
Server端代码:public class NioServer { //通道管理器 private Selector selector; //获取一个ServerSocket通道,并初始化通道 public NioServer init(int port) throws IOException{ //获取一个ServerSocket通道 ServerSocketChannel serverChannel = ServerSocketChannel.open(); serverChannel.configureBlock... 阅读全文