Add alternative characteristic read/write callbacks

Added alternative characteristic read/write callbacks that carry the connection description information.
Fixes h2zero/NimBLE-Arduino#83

Author: lknop <lknop@users.noreply.github.com>
This commit is contained in:
h2zero
2020-07-14 15:14:29 -06:00
parent 2a5df0c905
commit 2b4c1cd4f1
3 changed files with 30 additions and 3 deletions

View File

@ -45,12 +45,16 @@ A new method `NimBLEServer::advertiseOnDisconnect(bool)` has been implemented to
`NimBLEServer::removeService` takes an additional parameter `bool deleteSvc` that if true will delete the service
and all characteristics / descriptors belonging to it and invalidating any pointers to them.
If false the service is only removed from visibility by clients. The pointers to the service and
it's characteristics / descriptors will remain valid and the service can be re-added in the future
using `NimBLEServer::addService`.
<br/>
New characteristic read/write callbacks added to NimBLECharacteristicCallbacks that receive a pointer to the connection
description of the client reading/writing.
This is useful when connected to multiple clients to discern which client is performing the operation.
<br/>
# Client
NimBLERemoteCharacteristic::readValue(time_t\*, bool)