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? :)

Any ideas would be appreciated.

--
Cheers,

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

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

Reply via email to