- 博客(0)
- 资源 (2)
- 收藏
- 关注
网站开发基础知识
NioSocket中服务端的处理过程可以分为5部:
1) 创建ServerSocketChannel,并设置相应参数
2) 创建Selector并注册到ServerSocketChannel上
3) 调用Selector的select方法等待请求
4) Selector接收到请求后使用selectedKeys返回SelectionKey集合
5) 使用SelectionKey 获取Channel、Selector 和操作类型并进行操作。
2017-09-21
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人