Hi,

I'm using Mina 2.0 for implementing a network server application.
The server accepts client connections and communicates with them using
a custom TCP-based protocol.
I'd like to implement a separate control channel for the server
through which messages could be injected to be delivered to selected,
normal client session(s).

I've done some experimenting and it seems to be possible to get a list
of active IoSessions from an acceptor using
IoAcceptor.getManagedSessions().
You can then select the correct client session(s) and write packets to
the client using IoSession.write(myPacket).
Would this be a valid approach for implementing a control channel?

Are there any caveats I should be aware of? In particular are the
above mentioned APIs thread-safe?
What about other IoSession methods, e.g. getAttribute() and setAttribute()?


marko

Reply via email to