The onBind callback needs to be quick because the actual bind procedure needs to run afterwards so the client can actually connect to the device. If you make it run for 3600 seconds then the client will never actually bind to the device because your callback never returns for 1 hour. The onBind is useful to log who is connecting.
To do what you want, you need to use the client_api and not the server side. You can watch who binds to what devices in the client. You can run the client and the server on the same machine to make it easier. You can get a state of the whole system at any time by running vhui64.exe -t "GET CLIENT STATE". You can parse that to see who is connected. If they are still connected after an hour then send the "STOP USING" request
.
The onBind callback needs to be quick because the actual bind procedure needs to run afterwards so the client can actually connect to the device. If you make it run for 3600 seconds then the client will never actually bind to the device because your callback never returns for 1 hour. The onBind is useful to log who is connecting.
To do what you want, you need to use the client_api and not the server side. You can watch who binds to what devices in the client. You can run the client and the server on the same machine to make it easier. You can get a state of the whole system at any time by running vhui64.exe -t "GET CLIENT STATE". You can parse that to see who is connected. If they are still connected after an hour then send the "STOP USING" request