[Server] Add callback for MTU change. (#55)

onMTUChange callback added that is called when a connection MTU is updated.
This commit is contained in:
h2zero
2021-07-19 21:47:59 -06:00
committed by GitHub
parent 7d01fa595d
commit 0a2714c169
3 changed files with 21 additions and 0 deletions
@@ -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 ********/