blecent_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 is established. central uses the same callback for all connections.
Arguments
event
The event being signalled.
arg
Application-specified argument; unused by gattc.
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.