I've struggled for the past week on how to phrase this question, but here goes:
I'd like to use MINA to replace an implementation of a proprietary binary protocol that has both synchronous and asynchronous components. That is, part of the communications are regular call/response paradigm, but some are asynchronous observer-pattern messages. For the former, the app is acting like a client, for the latter, the app is acting like a server. The best comparison I can think of is SNMP, as it has both regular synchronous ops (GET, GETNEXT, etc.) and SNMP traps. In regular Java blocking I/O, we handled this with reader/writer thread pair attached to a queue. Items to be sent would be posted the the queue, and items received were posted to the receive queue. Simple enough. So far, for a prototype, I implemented the synchronous parts using an IOConnector, and that works well enough, but it won't work for the asynchronous case. I'm assuming I can implement an IOAcceptor for the asynchronous case, but how does that handle when I just need to open a session, send some traffic and receive a response on that same session? Typically, this app runs both sync and async traffic over the same port, and I don't think I can have both an IOAcceptor and IOConnector bound to the same port, correct? I'm thinking what I want to do is pretty trivial, if I can just get my mind around HOW. :-)
