0
java | channel 简介
source link: https://benpaodewoniu.github.io/2023/01/25/java192/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
channel 简介
姑苏城外一茅屋,万树梅花月满天
channel 的作用。
close
- 关闭
channel
- 关闭
closeFuture()
- 用来处理
channel
的关闭 sync
方法作用是同步等待channel
关闭- 而
addListener
方法是异步等待channel
关闭
- 用来处理
pipeline
- 添加处理器
write
- 写入数据
- 可能由于数据太短,会把数据存到缓冲区内,然后,等待数据很长后,再发送,或者执行
flush()
发送
- 可能由于数据太短,会把数据存到缓冲区内,然后,等待数据很长后,再发送,或者执行
- 写入数据
writeAndFlush
- 将数据写入并刷出
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK