Channel attachments?
Robert Wahlstedt
rob at isketch.net
Fri Jun 11 11:30:12 EDT 2010
On Jun 10, 2010, at 22:46 , blakeman8192 wrote:
> I need a more elegant way to keep track of different objects (i.e. a Player object) for a Channel.
> Is this overlooked in the Netty design, or (more likely) am I missing something?
This is probably a very common functionality needed when building Netty based programs. More attention in the javadocs/documentation for best practices would be nice.
I have solved it simply by subclassing DefaultChannelPipeline and putting the variables I need there. That way all of my handlers can access it by ChannelHandlerContext.getPipeline()
/Rob
More information about the netty-users
mailing list