Client Disconnect Callback

in Help Center
Is there a way to set up a callback on a client disconnect so that resources relating to that client can be cleaned up.
Or,is the only option to periodically review connections to see when client last communicated.
I noticed that with the ice logging turned on , an exception was raised when the client dropped off (for tcp connections art least). Is there any way to trap this event.
Or,is the only option to periodically review connections to see when client last communicated.
I noticed that with the ice logging turned on , an exception was raised when the client dropped off (for tcp connections art least). Is there any way to trap this event.
0
Comments
I guess what you really need is session management, for example like Glacier does it. There are many ways to do this, such as having a thread that cleans up sessions for clients that have been idle for a certain period of time.
I would like to have custom logging of client connection/disconnection for diagnostic purposes. Just have some way to log "Adapter X accepted connection from IP address a.b.c.d". Similar message would be logged when the client disconnects. ACM won't interfere in our case since our clients generate continuous stream of ice_ping calls.
You can use the new instrumentation facility for this purpose (only available since Ice 3.5). See Instrumentation Facility in the Ice manual and the Slice API documentation for more information on how to use this facility. Note that if you install a communication observer, this will disable the metrics administrative facet, Ice currently doesn't support using both.
Cheers,
Benoit.