Article Directory
1 Overview
ChannelHandler has no methods to handle events, but needs to be handled by subclasses: ChannelInboundHandler intercepts and handles inbound events, ChannelOutboundHandler intercepts and handles outbound events. We have already understood that the events in ChannelPipeline will not flow automatically, and we generally need events to flow automatically. Netty provides two Adapters: ChannelInboundHandlerAdapter and ChannelOutboundHandlerAdapter to meet this demand. The implementation is similar to the following:
// inboud事件默认处理过程
public void