onConnectionStatusChanged

This function will be called when the connection status changes.