[Breaking] Add disconnect reason to client callback. (#398) (#81)

Adds the reason code as a parameter to the client onDisconnect callback.

* Update examples/docs.
This commit is contained in:
h2zero
2022-08-26 19:51:19 -06:00
committed by GitHub
parent bb3dd5f114
commit bfe68f4a91
6 changed files with 18 additions and 18 deletions
+8
View File
@@ -16,6 +16,7 @@ For more information on the improvements and additions please refer to the [clas
* [Client](#client-api)
* [Remote Services](#remote-services)
* [Remote characteristics](#remote-characteristics)
* [Client Callbacks](#client-callbacks)
* [Security](#client-security)
* [Scanning](#scan-api)
* [General Security](#security-api)
@@ -316,6 +317,13 @@ the currently known database returned (false : default).
Also now returns a pointer to `std::vector` instead of `std::map`.
<br/>
<a name="client-callbacks"></a>
### Client callbacks
> `BLEClientCallbacks::onDisconnect` (`NimBLEClientCallbacks::onDisconnect`)
This now takes a second parameter `int reason` which provides the reason code for disconnection.
<a name="client-security"></a>
### Client Security
The client will automatically initiate security when the peripheral responds that it's required.