public class UdpSelector extends Object
| 构造器和说明 |
|---|
UdpSelector(Selector selector,
SocketContext socketContext)
事件监听器构造
|
| 限定符和类型 | 方法和说明 |
|---|---|
void |
eventChose()
所有的事件均在这里触发
|
DatagramChannel |
getDatagramChannel(SelectionKey selectionKey)
获取 socket 通道
|
public UdpSelector(Selector selector, SocketContext socketContext)
selector - 对象SelectorsocketContext - socketContext 对象public void eventChose()
public DatagramChannel getDatagramChannel(SelectionKey selectionKey) throws IOException
selectionKey - 当前 SelectionkeyIOException - IO 异常Copyright © 2017 Voovan. All rights reserved.