Shiran wrote:
Hi,
Hi,
I need to write application that open socket connection to
server and send/receive multi requests/responses simultaneously.
Your client will send/receive multiple reques/response from one server
only ? (assuming this is what you have in mind for the following response)
Instead of open few socket connections I want to use mina thread
model
The MINA thread model is just good to handle parallel processing of
multiple sessions (ie, une session = one connexion between a client and
a server). Remember that whatever your thread model will be, at the end,
it goes through _one_ single socket, where everything is processed as in
a queue.
IoConnector connector = new
NioSocketConnector(Runtime.getRuntime().availableProcessors() + 1,
Executors.newCachedThreadPool());
I'm not sure how to use it :
"Each SocketAcceptor or SocketConnector creates its own I/O
processor thread(s)" - do I need to handle the threads or just
Call getSession whenever I need to send message ?
What _exactly_ do you want to do ?
--
--
cordialement, regards,
Emmanuel Lécharny
www.iktek.com
directory.apache.org