How to trigger event when device gets disconnected. like Network failure/ Machine power off with Zkemkeeper

247 views Asked by At

I want to know if device gets disconnedted by Power failure/Network Cable Disconnect/ Or any thing except specifically calling CZKEMClass.Disconnect().

1

There are 1 answers

0
Ravanan On BEST ANSWER

No, you cannot get it by default. The disconnect event triggered for now is through a software interrupt. So, when the device is disconnected, you won't get the event triggered. But you can write a small worker thread which will check the connection status in an interval, once connection-status is found as disconnected, you can trigger the event internally.