forked from h2zero/esp-nimble-cpp
Add new getServer() method.
Previously we used createServer() to get a reference to the server instance. This was problematic when using advertising only as it would create a server when starting advertising. This prevents that and provides better semantics.
This commit is contained in:
1 parent
03cb7b21d9
commit
fc1022a46d
3 files changed
+22
-8
No files matched your search
@@ -102,6 +102,7 @@ public:
|
||||
|
||||
#if defined(CONFIG_BT_NIMBLE_ROLE_PERIPHERAL)
|
||||
static NimBLEServer* createServer();
|
||||
static NimBLEServer* getServer();
|
||||
#endif
|
||||
|
||||
static void setPower(esp_power_level_t powerLevel, esp_ble_power_type_t powerType=ESP_BLE_PWR_TYPE_DEFAULT);
|
||||
|
||||
Reference in new issue
Block a user