Le 5/1/14 5:56 PM, Aidan Diffey a écrit :
> I kinda got that far, I was wondering where I do it from?  Would perform a
> session.close() from the MessageHandlers registered with the
> DemuxingIoHandle or is there central place this can be done from?
Usually, the best place to do that is i the Handler. Typically, when you
have sent the last message to the device, you can trap the messageSent
event, and close the session there. Or you can also trap the idle event
and close the session when it has iddled for too long.

Last, not least, assuming that your application has a thread on its own,
which has access to the session instance, you can do a session.close()
whenever you want.


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

Reply via email to