Hi,
I'm thinking also about a session storage. If nobody else has a better
idea, I would implement a SessionManager class with an integrated Vector
(or in my case Hashtable). The class has two methods addSession() and
removeSession(), which would be called / triggered in the IoSession
sessionOpened() and sessionClosed() methods.
The advantage in my case would be, that I could search from my business
logic layer for a specified client over a getSession( String pKey )
method (each client has a different id) and do all the things I want to
do ...
Regards
Michael
Ziyan Maraikar wrote:
Hello
I'm looking at using MINA for a Gnutella-like p2p protocol
implementation and I need to somehow send a query to a subset of peers I
have a connection to. Apparently MINA doesn't yet support multicast but
can I somehow maintain a list of connections (both accepted incoming and
established outgoing) and have the packet sent a subset of those
connections.
I can get a list of incoming connections from
IoService.getManagedSessions() by specifying localhost as argument but
how do I get outgoing connections? Also I think I need a functions
similar to BroadcastIoSession.write() for sending packets to chosen
connections, but I can't find this interface implemented anywhere.
TIA for any help and sorry if these questions have been already
asked/answered. Please CC any replies to me.
regards,
ziyan maraikar