请问下这种方式的设置参数是什么意思?
socketChannel.register(selector,SelectionKey.OP_READ|SelectionKey.OP_WRITE)
SelectionKey.OP_READ|SelectionKey.OP_WRITE
这样设置有什么用处?
请问下这种方式的设置参数是什么意思?
socketChannel.register(selector,SelectionKey.OP_READ|SelectionKey.OP_WRITE)
SelectionKey.OP_READ|SelectionKey.OP_WRITE
这样设置有什么用处?
[code="java"]我是问 method(a|b) 方法 这样写法是怎么理解 [/code]
这个就是套接字的或操作
表示两个都关心
其实就是两个数字