ble_multi_adv_gap_event() function
The nimble host executes this callback when a GAP event occurs. The application associates a GAP event callback with each connection that forms. bleprph uses the same callback for all connections.
Arguments
event
The type of event being signalled.
arg
Application-specified argument; unused by bleprph.
Return value
0 if the application successfully handled the event; nonzero on failure. The semantics of the return code is specific to the particular GAP event being signalled.