Imagine the following scenario:
There are multiple clients and same message is dispatched to all of them. 
Now the message can be a single string, or, it can be a more complex object.
Since the MessageToByteEncoder.encode's output will result in the same byte 
buffer each and every time, why not actually call the operation just once 
and then write that out buffer to each channel.

This is important not only for sparing some system resource. Also imagine I 
have an message pool that I reuse, so if I decode particular message once, 
I know when I can "release" it.
Otherwise I'll need to trace whether it has been written to all receiving 
channels and "release" then.

Thanks

-- 
You received this message because you are subscribed to the Google Groups 
"Netty discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/netty/e09ed85c-4117-48f3-80d4-34a7941dad3a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to