I'm new to Netty and don't really understand the flow of handlers in it. What I want to know is the difference between the Upstream and Downstream handlers.
The difference is that one handles incoming (upstream) and the other outgoing (downstream).
I think the event/message flow gets more clear after looking at the javadoc of ChannelPipeline.
I should also note that upstream events will only get triggered by the IO-Thread so there is no need to synchronize field access in there if you use a new ChannelUpstreamHandler per ChannelPipeline. Downstream events can be triggered by any thread, so access to fields needs to be synchronized.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With