On Jun 29, 2006, at 11:02 PM, Claudio Miranda wrote:
        I am a little confused about the timeouts.
I would like a little bit of explanations of what does mean and its consequences the following timeouts:


IoConnectorConfig.setConnectTimeout(int connectTimeout)

 if the client could not establish a connection with the server in
 connectTimeout = 30 seconds, what happens ?
 Tried to connect to a non existent server, then a
"java.net.ConnectException: Connection refused" was throw

or when the server could not accept the connection at the specidied timeout ?

You weren't successful in tricking the system in connecting to something non-existent. Try a service that just doesn't respond to your packets, then the connect timeout should behave a bit better.

SocketConnector.setWorkerTimeout(long workerTimeout)
IoSession.setWriteTimeout(int writeTimeout)
IoSession.setIdleTime(IdleStatus status, int idleTime)

So, which timeout, when specified on the client will cause the connection to be closed, when it is reached ?

none.

what you want is to set IoSession.setIdleTime(), and then in IoHandler.sessionIdle(), react to that by doing what you want, which sounds like closing the connection.

-pete

--
[EMAIL PROTECTED] - http://fotap.org/~osi



Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to