我看到大部分人用的都是 Inbound 的接口
但是 outbound 里面有 read() write() close() 这些接口,什么时候会用到呢?
因为感觉作用和 Inbound 接口是重叠的,调用顺序也基本和 Inbound 重叠,Inbound 链中也可以对出站数据进行处理,传入参数都是 ChannelHandlerContext
网上的资料和官方 doc 也讲的很玄乎,入站出站,但是 debug 一下就发现和 Inbound 是重叠的,只是名字不一样
in.channelActive()
out.read()
in.channelRead()
in.channelReadComplete()
out.close()
in.channelInactive()
但是 outbound 里面有 read() write() close() 这些接口,什么时候会用到呢?
因为感觉作用和 Inbound 接口是重叠的,调用顺序也基本和 Inbound 重叠,Inbound 链中也可以对出站数据进行处理,传入参数都是 ChannelHandlerContext
网上的资料和官方 doc 也讲的很玄乎,入站出站,但是 debug 一下就发现和 Inbound 是重叠的,只是名字不一样
in.channelActive()
out.read()
in.channelRead()
in.channelReadComplete()
out.close()
in.channelInactive()