How to monitor client disconnect?

Topics: Bluetooth - Microsoft
May 22, 2012 at 5:26 AM

How to monitor client disconnect?

Developer
May 22, 2012 at 8:45 AM

The client has connected to your BluetoothListener server?  If so then keep reading from the NetworkStream/BluetoothClient instance -- when it disconnects you get an error or EoF.

if the peer device is just connected to your Bluetooth radio for other reasons e.g. to do discovery then on desktop Windows you can use library class BluetoothWin32Events.