how to manage connections?

falconair shahbazc at gmail.com
Sun Nov 21 18:43:46 EST 2010


Say I have a simple server:

final ServerChannelFactory cf = ...
final ServerBootstrap server = new ServerBootstrap(cf);
server.bind(...);

How can I get a list of all clients currently connected (perhaps their
remote address and the  time at which they first connected)?

My specific protocol has a unique ID associated with each connection.  How
can I get a connection by ID and, say, kill it?  How can I ensure the same
ID is not used by multiple connections?

In each of those cases, a data structure needs to be accessed both, inside
and outside connection pipelines.  Should I just pass in a thread safe data
structure to each of my handlers, which then update it with relevant
information (their own ID for example)?  Is there a more standard way of
doing this?

Thanks
-- 
View this message in context: http://netty-forums-and-mailing-lists.685743.n2.nabble.com/how-to-manage-connections-tp5761250p5761250.html
Sent from the Netty User Group mailing list archive at Nabble.com.


More information about the netty-users mailing list