Package org.aoju.bus.socket
Class UdpAioSession
java.lang.Object
org.aoju.bus.socket.AioSession
org.aoju.bus.socket.UdpAioSession
-
Field Summary
Fields inherited from class org.aoju.bus.socket.AioSession
SESSION_STATUS_CLOSED, SESSION_STATUS_CLOSING, SESSION_STATUS_ENABLED, status -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidclose(boolean immediate) 为确保消息尽可能发送,UDP不支持立即close获取当前会话的本地连接地址获取当前会话的远程连接地址获取读缓冲区对象void继续触发读行为,该方法仅可在异步处理模式下可使用,否则会触发不可预知的异常获取WriteBuffer用以数据输出Methods inherited from class org.aoju.bus.socket.AioSession
close, getAttachment, getInputStream, getInputStream, getSessionID, isInvalid, setAttachment
-
Method Details
-
writeBuffer
Description copied from class:AioSession获取WriteBuffer用以数据输出- Specified by:
writeBufferin classAioSession- Returns:
- WriteBuffer
-
readBuffer
-
awaitRead
public void awaitRead()- Specified by:
awaitReadin classAioSession
-
signalRead
public void signalRead()Description copied from class:AioSession继续触发读行为,该方法仅可在异步处理模式下可使用,否则会触发不可预知的异常- Specified by:
signalReadin classAioSession
-
close
public void close(boolean immediate) 为确保消息尽可能发送,UDP不支持立即close- Specified by:
closein classAioSession- Parameters:
immediate- true:立即关闭,false:响应消息发送完后关闭
-
getLocalAddress
Description copied from class:AioSession获取当前会话的本地连接地址- Specified by:
getLocalAddressin classAioSession- Returns:
- 本地地址
- Throws:
IOException- IO异常- See Also:
-
getRemoteAddress
Description copied from class:AioSession获取当前会话的远程连接地址- Specified by:
getRemoteAddressin classAioSession- Returns:
- 远程地址
- See Also:
-