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
06-07
05-17
05-17
“相关推荐”对你有帮助么?
-
非常没帮助
-
没帮助
-
一般
-
有帮助
-
非常有帮助
提交