Alright so I am experimenting with Netty 4.0.19 (which is great by the way) and having one connection works fine, but once there are multiple connections there is an error that the handler is not a shared handler and cannot have multiple items.
This is my Handler class: ChannelManager.java
I was thinking, maybe every connection needs its own handler, but then I'm not sure how I will implement that in my current environment. Any suggestions or ideas?
EDIT : I wasn't sure how to ask this question on google... so excuse me if this question already exists.
I think it has something to do with line 59 in the code. I saw some use of a ChannelInitializer but I don't know how to use that.
if your handler can be shared between multiple clients you need to annotate the class with:
@ChannelHandler.Sharable
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