Add NimBLEClientCallbacks::onConnectFail callback

Adds a callback that is called when the connection attempt fail while connecting asynchronously.
This commit is contained in:
h2zero
2024-11-25 16:08:13 -07:00
committed by h2zero
parent 41a7aa8eb5
commit a4043e3f04
2 changed files with 26 additions and 15 deletions
+8 -1
View File
@@ -148,10 +148,17 @@ class NimBLEClientCallbacks {
/**
* @brief Called after client connects.
* @param [in] pClient A pointer to the calling client object.
* @param [in] pClient A pointer to the connecting client object.
*/
virtual void onConnect(NimBLEClient* pClient);
/**
* @brief Called when a connection attempt fails.
* @param [in] pClient A pointer to the connecting client object.
* @param [in] reason Contains the reason code for the connection failure.
*/
virtual void onConnectFail(NimBLEClient* pClient, int reason);
/**
* @brief Called when disconnected from the server.
* @param [in] pClient A pointer to the calling client object.