mina-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From peter royal <pro...@apache.org>
Subject Re: A little confused about the many timeouts
Date Tue, 04 Jul 2006 21:10:48 GMT
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

-- 
proyal@apache.org - http://fotap.org/~osi




Mime
View raw message