Hi Tzvika,

On Nov 29, 2007 2:04 AM, Tzvika Barenholz <[EMAIL PROTECTED]> wrote:
> Hi all
>
> I'm writing a simulator that needs to make many (say 1,000) connections to a
> server, interact with it using a commutative protocol, and examine the
> various server responses. I am familiar with how to write such a *Server*
> using the MINA api, but I can't seem to find any sample code or directions
> for writing a *client*.

It's essentially same.  Only one difference is that you have to use an
IoConnector such as SocketConnector.  That's all.  Please let me know
if you are stuck with more specific issues.

> The NIO equivalent work that I would do is create 1,000 SocketChannel
> objects, connect them all, register them with a selector, and iterate
> forever over the selection keys. How can I accomplish this using MINA?

That's what MINA is currently doing.  Please give SocketConnector a try.

HTH,
Trustin
-- 
what we call human nature is actually human habit
--
http://gleamynode.net/
--
PGP Key ID: 0x0255ECA6

Reply via email to