mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-07 16:29:51 +03:00
remove esp8266
This commit is contained in:
@@ -19,12 +19,7 @@
|
|||||||
#include "uuid/telnet.h"
|
#include "uuid/telnet.h"
|
||||||
|
|
||||||
#include <Arduino.h>
|
#include <Arduino.h>
|
||||||
#if defined(ESP8266)
|
|
||||||
#include <ESP8266WiFi.h>
|
|
||||||
#elif defined(ESP32)
|
|
||||||
#include <WiFi.h>
|
#include <WiFi.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <WiFiUdp.h>
|
#include <WiFiUdp.h>
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
@@ -72,9 +67,9 @@ TelnetService::TelnetService(std::shared_ptr<uuid::console::Commands> commands,
|
|||||||
}
|
}
|
||||||
|
|
||||||
TelnetService::TelnetService(uint16_t port, std::shared_ptr<uuid::console::Commands> commands, unsigned int context, unsigned int flags)
|
TelnetService::TelnetService(uint16_t port, std::shared_ptr<uuid::console::Commands> commands, unsigned int context, unsigned int flags)
|
||||||
: TelnetService(port,
|
: TelnetService(port, [commands, context, flags](Stream & stream, const IPAddress & addr __attribute__((unused)), uint16_t port __attribute__((unused))) -> std::shared_ptr<uuid::console::Shell> {
|
||||||
[commands, context, flags](Stream & stream, const IPAddress & addr __attribute__((unused)), uint16_t port __attribute__((unused)))
|
return std::make_shared<uuid::console::StreamConsole>(commands, stream, context, flags);
|
||||||
-> std::shared_ptr<uuid::console::Shell> { return std::make_shared<uuid::console::StreamConsole>(commands, stream, context, flags); }) {
|
}) {
|
||||||
}
|
}
|
||||||
|
|
||||||
TelnetService::TelnetService(shell_factory_function shell_factory)
|
TelnetService::TelnetService(shell_factory_function shell_factory)
|
||||||
@@ -150,9 +145,7 @@ void TelnetService::loop() {
|
|||||||
if (client) {
|
if (client) {
|
||||||
if (connections_.size() >= maximum_connections_) {
|
if (connections_.size() >= maximum_connections_) {
|
||||||
#if UUID_TELNET_HAVE_WIFICLIENT_REMOTE
|
#if UUID_TELNET_HAVE_WIFICLIENT_REMOTE
|
||||||
logger_.info(F("New connection from [%s]:%u rejected (connection limit reached)"),
|
logger_.info(F("New connection from [%s]:%u rejected (connection limit reached)"), uuid::printable_to_string(client.remoteIP()).c_str(), client.remotePort());
|
||||||
uuid::printable_to_string(client.remoteIP()).c_str(),
|
|
||||||
client.remotePort());
|
|
||||||
#else
|
#else
|
||||||
logger_.info(F("New connection rejected (connection limit reached)"));
|
logger_.info(F("New connection rejected (connection limit reached)"));
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user