Yes, so I should not use the handler?
Just create 500 "connectors" w/ try catch block ?
And if so, should each of the 500 connectors be in a endless loop?
.V
Trustin Lee wrote:
On 6/28/06, netsql <[EMAIL PROTECTED]>
wrote:
It seems that sessionCreated fires when connection is made.
What fires when connection times out (in handler?) ?
Also, when I call connect, I want to track what port I told it to go.
I will have 500 threads going at a time, when it connects or timesout, I
need to extract that port in the method.
IoConnector.connect() returns ConnectFuture. You can use ConnectFuture to
detect any problem occurred while attempting a connection.
ConnectFuture future = ...;
future.join(); // wait until the future is now.
try {
IoSession session = future.getSession();
} catch (RuntimeIOException e) {
e.printStackTrace();
}
HTH,
Trustin