Core API
onConnectionStatus
The onConnectionStatus callback is called whenever the device changes its network connection status. The callback will be called with NetWizardConnectionStatus enum as its parameter.
Connection Statuses
Here are all the possible connection statuses that can be returned by the onConnectionStatus callback:
NetWizardConnectionStatus::DISCONNECTEDNetWizardConnectionStatus::CONNECTINGNetWizardConnectionStatus::CONNECTEDNetWizardConnectionStatus::CONNECTION_FAILEDNetWizardConnectionStatus::CONNECTION_LOSTNetWizardConnectionStatus::NOT_FOUND
API Reference
void setup() {
...
// This callback will be called upon connection status changes
NW.onConnectionStatus([&](NetWizardConnectionStatus status) {
... // <-- add your own logic here
});
...
}