Hi,
Thanks for you response.
Yes I need to connect to one server.
Sorry I didn't understand what do you mean processing of multiple
sessions if I have only one session?
First time using mina and try to find an example .
My application is part of server application that read messages and
sends it to another server (like gateway).
Thanks
-----Original Message-----
From: Emmanuel Lecharny [mailto:[EMAIL PROTECTED]
Sent: Monday, November 24, 2008 10:08 PM
To: [email protected]
Subject: Re: Multi client connections
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
__________ NOD32 3575 (20081031) Information __________
This message was checked by NOD32 antivirus system.
http://www.eset.com