|
ESP8266 WiFi Client
|
A controller for a WiFi connection. More...
#include <wifi-connection.hpp>
Public Member Functions | |
| auto | isConnected () -> bool |
| void | init (std::list< WifiDependent * > dependents) |
Static Public Member Functions | |
| static auto | getInstance () -> WifiConnection & |
A controller for a WiFi connection.
A singleton that will take care of your WiFi connection. It will try to establish a connection, attempt reconnects in case of a connection loss and inform registered WifiDependent s about successful connects as well as connection losses by calling their WifiDependent::onWifiConnectionEstablished() or WifiDependent::onWifiConnectionLost() callback respectively.
|
inlinestatic |
Gets the Singleton instance.
| void WifiConnection::init | ( | std::list< WifiDependent * > | dependentsList | ) |
Initializes the controller while registering a collection of WifiDependent s.
| dependents | A collection of instances that depend on a WiFi connection. The dependents will be informed about changes in the connection's status. |
| bool WifiConnection::isConnected | ( | ) | -> bool |
Returns the WiFi connection status.
true in case the WiFi connection is established or false otherwise.