NIO
1) 缓冲buffer
最核心的是四个属性:
mark position limit capacity
2) 通道channel
通道只能在字节缓冲区上操作;
ServerSocketChannel ssc = ServerSocketChannel.open( );
ServerSocket serverSocket = ssc.socket( );
// Listen on port 1234
serverSocket.bind (new InetSocketAddress (1234));
3) 选择器 Selector
NIO
最新推荐文章于 2025-09-19 22:52:05 发布
3083

被折叠的 条评论
为什么被折叠?



