Le 1/18/13 2:48 PM, Jon V a écrit :
> Emmanuel, 
>
> I am trying to find out how Mina is detecting Session closures for 2.0.7.  
> Source searches do not seem to help.  Can you point me in the right 
> direction? 

Depends.

- If the session is cleanly closed, your IoHandler will received a
SessionClosed event. You just have to implement the sessionClosed(
IoSession ) method in your IoHandler.

- If the session is brutally closed, like when you unplug your network
cable from the socket, the remote peer will never be informed. the only
solutio is to check for the session idleness. When a session becomes
idle (the idle delay is configurable), you will received a SessionIdle
event. You have to implement the sessionIdle( IoSession ) method to trap
this event and decide if the session has to be deleted.

Is this what you are looking for ?


-- 
Regards,
Cordialement,
Emmanuel Lécharny
www.iktek.com 

Reply via email to