* Add and remove libs and components for Arduino Core 3 * Arduino Core 3 * Add back Solo1 * Change ESP32-S3 to 4MB build * Update README.md * Fix retain and number of retries * Fix rolling log * Fix defaults * Fix BleScanner on Solo1 * Export settings * Import settings * Fix HA Battery voltage * Change submodule * Update espMqttClient and AsyncTCP * Webserial and MQTT/Network reconnecting * Update nuki_ble --------- Co-authored-by: iranl <iranl@github.com>
57 lines
918 B
C++
57 lines
918 B
C++
#include "WifiEthServer.h"
|
|
|
|
|
|
WifiEthServer::WifiEthServer(IPAddress address, int port)
|
|
: EthServer(address, port),
|
|
_wifiServer(address, port)
|
|
{
|
|
|
|
}
|
|
|
|
WifiEthServer::WifiEthServer(int port)
|
|
: EthServer(port),
|
|
_wifiServer(port)
|
|
{
|
|
|
|
}
|
|
|
|
void WifiEthServer::close()
|
|
{
|
|
_wifiServer.close();
|
|
}
|
|
|
|
void WifiEthServer::begin(const int port)
|
|
{
|
|
_wifiServer.begin(port);
|
|
}
|
|
|
|
void WifiEthServer::setNoDelay(const bool value)
|
|
{
|
|
_wifiServer.setNoDelay(value);
|
|
}
|
|
|
|
EthClient* WifiEthServer::available()
|
|
{
|
|
if(_wifiEthClient != nullptr)
|
|
{
|
|
delete _wifiEthClient;
|
|
_wifiEthClient = nullptr;
|
|
}
|
|
|
|
_wifiClient = _wifiServer.accept();
|
|
_wifiEthClient = new WifiEthClient(&_wifiClient);
|
|
return _wifiEthClient;
|
|
}
|
|
|
|
|
|
void WifiEthServer::discardClient()
|
|
{
|
|
if(_wifiEthClient != nullptr)
|
|
{
|
|
delete _wifiEthClient;
|
|
_wifiEthClient = nullptr;
|
|
}
|
|
|
|
_wifiClient = WiFiClient();
|
|
}
|