Okay i understand but i mean what kind of timeout is this from 

// Configure the service.
connector.setConnectTimeoutMillis(CONNECT_TIMEOUT);

What is the difference between IoSessionConfig.setIdleTime and
AbstractIoConnector.setConnectTimeoutMillis?


Pavel Zdeněk wrote:
> 
> [email protected] napsal(a):
>> Hi,
>> can someone explain me some stuff from org.apache.mina.example.sumup?
>>
>> ClientSessionHandler extends from IoHandlerAdapter and the api doc says
>> that "All methods do nothing by default." ClientSessionHandler does not
>> override the sessionIdle method. So is it correct that the line:
>> private static final long CONNECT_TIMEOUT = 30*1000L; // 30 seconds
>> is never used?
>>
>> Max
>>   
> No, it is used in main() method. The connect timeout is a property of 
> IoConnector, not of IoHandlerAdapter. SessionIdle may happen only on 
> opened session (i.e. succesfuly connected). First you connect to server, 
> and sessionCreated event happen at least. Only then you may get 
> sessionIdle event. You drive that timeout by 
> IoSessionConfig.set**IdleTime (being set in sessionCreated in the sumup 
> example).
> 
> Pavel
> 
> 

-- 
View this message in context: 
http://www.nabble.com/client-connect-timeout-at-sumup-example-tp23781640p23784510.html
Sent from the Apache MINA User Forum mailing list archive at Nabble.com.

Reply via email to