Re: Configuring idle timeouts on server

2022-03-07 Thread Marc Boorshtein
Closing the loop, and hoping for a logic check to make sure my thinking is correct. I was able to make this work by: 1. Creating an IoServiceListener on my acceptor 2. The IoServiceListener creates a Thread that iterates over all of the IoSessions in the ManagedSessions map if an

Re: Configuring idle timeouts on server

2022-03-07 Thread Emmanuel Lécharny
Also note that we can get idling event for - read - write - both Ie if a session has not written for a specific period of time, an idle event will be generated and transmitted for WRITE, and not for READ. Also note that the event is at least generated once a second, but not necessarily

Re: Configuring idle timeouts on server

2022-03-07 Thread Emmanuel Lécharny
Hi Marc, this is probably a bit overkilling, especially if you manage many sessions. A better solution would be to modify the Handler to catch the sessionIdle event and check for how long the session was idling (the event will be received every second) On 07/03/2022 16:28, Marc Boorshtein

Re: Configuring idle timeouts on server

2022-03-07 Thread Emmanuel Lécharny
On 07/03/2022 17:45, Marc Boorshtein wrote: A better solution would be to modify the Handler to catch the sessionIdle event and check for how long the session was idling (the event will be received every second) When you say "modify the Handler", does that require a change to

Re: Configuring idle timeouts on server

2022-03-07 Thread Marc Boorshtein
> > > > A better solution would be to modify the Handler to catch the > sessionIdle event and check for how long the session was idling (the > event will be received every second) > > > When you say "modify the Handler", does that require a change to Mina's code? or is this something I can do

Re: Configuring idle timeouts on server

2022-03-07 Thread Marc Boorshtein
> > > So just override this method to get the event. > > Yes, this is perfect and what I was looking for! much better then my first approach and is working great! Thanks again! Marc