forked from h2zero/esp-nimble-cpp
[Server] Add callback for MTU change. (#55)
onMTUChange callback added that is called when a connection MTU is updated.
This commit is contained in:
@@ -41,6 +41,9 @@ class ServerCallbacks: public NimBLEServerCallbacks {
|
||||
printf("Client disconnected - start advertising\n");
|
||||
NimBLEDevice::startAdvertising();
|
||||
};
|
||||
void onMTUChange(uint16_t MTU, ble_gap_conn_desc* desc) {
|
||||
printf("MTU updated: %u for connection ID: %u\n", MTU, desc->conn_handle);
|
||||
};
|
||||
|
||||
/********************* Security handled here **********************
|
||||
****** Note: these are the same return values as defaults ********/
|
||||
|
||||
Reference in New Issue
Block a user