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