I need to implement a class that will be able to passively listen on one (or maybe more) ports and, at the same time, actively connect to one or more processes running on other hosts and/or ports. It is clear that I would need to use the NioSocketAcceptor and NioSocketConnector classes, but it is not so clear how to issue the accept / connect calls. Can anybody suggest an example where I can see such behavior implemented?
Can I listen on more than one port using a single instance of NioSocketAcceptor, or would I need to have multiple instances of NioSocketAcceptor in order to do this? What is the proper way of handling the case where a connect fails because the peer is not up yet, so I would like to retry the connection, maybe using some kind of exponential back off? A more generic question: is there any documentation for developers using MINA? Or maybe a more complete example that could be helpful in showing recommended approaches? Thanks and best regards, -- Gonzalo Diethelm DCV - Chile
