How to check whether a connection is closed by an unknown reason

Mar 13, 2013 at 11:50 AM
Edited Mar 13, 2013 at 12:52 PM
Hi,

I want to know whether a connection was closed by user (disconnect button pressed)
or was closed by another reason like power off or wlan goes offline.

I have set a breakpoint into the SessionClosed event, but he only fire it, if I press the disconnect button not if the client gets disconnect.

I don't want wait for the connection timeout.

is there any other event, which I can use?