This is an attempt to load-test a server over a single open socket.
Yes, the intent is to verify the response to give us a failure rate
for the server (how many requests were not processed correctly).

On 4/19/07, mat <[EMAIL PROTECTED]> wrote:
Is that kind of synchronous task? I think sometimes it is neccessary since
right now mina is asynchronous.(send message and forget it).
But in some cases, we need know the response from this session before doing
more action. Did I understand correctly?


2007/4/18, Trustin Lee <[EMAIL PROTECTED]>:
>
> Hi Kevin,
>
> On 4/18/07, Kevin Williams <[EMAIL PROTECTED]> wrote:
> > I'm not sure if "long session" is the right term. What I want to do is
> > use a Mina SocketConnector to connect to a service, send a bunch of
> > messages back and forth, then close the connection. I'm thinking in
> > sort of a top-down mode rather than bottom-up. Perhaps some
> > pseudo-code will help explain.
> >
> > IoSession session = new SocketConnector().connect( new
> > InetSocketAddress( 999 ), new MyHandler() );
> > for( int i = 0; i < 10000; i++ ) {
> >   session.write( "hello world" );
> >   // read back result
> >   // verify result
> > }
> > session.close();
> >
> > I understand how the IoHandler sends and receives messages, but I
> > can't figure out how to drive that multiple times over one session.
> >
> > Clear as mud? :)
>
> MyHandler (your IoHandler implementation) will be notified when a
> result message is received.  There's no way to receive a message
> outside of an IoHandler for now.  It's a good feature to have, so we
> are considering adding a related feature as an extension soon in 2.0.
>
> If you are a brave guy, you could try the latest revision in our
> source code repository, or back-port small part of it.  It has a
> feature that makes it easy to implement a request-response protocol.
>
> http://issues.apache.org/jira/browse/DIRMINA-92#action_12488311
>
> HTH,
> Trustin
> --
> what we call human nature is actually human habit
> --
> http://gleamynode.net/
> --
> PGP Key ID: 0x0255ECA6
>



--
Cheers,

Kevin Williams
http://www.almostserio.us/

"Any sufficiently advanced technology is indistinguishable from
Magic." - Arthur C. Clarke

Reply via email to