Open h2zero opened 1 month ago
Maybe this is already implemented.
User code may implement a NimBLECharacteristicCallbacks::onRead()
callback (on the proper characteristic) to perform flow control using semaphores. Before doing so, user code must also keep track of how many clients are actually using the characteristic thanks to the onSubscribe()
callback. You can have many different services in a GATT server, but clients are not forced to use all of them. As a result, the count of connected clients is not reliable for this purpose.
Discussed in https://github.com/h2zero/NimBLE-Arduino/discussions/707