Add socket server compatible with original software

This commit is contained in:
2024-04-11 14:38:45 +02:00
parent 4b13827803
commit 71facb7d18
2 changed files with 39 additions and 1 deletions

View File

@@ -4,9 +4,11 @@
#include "credentials.h"
#include "webserver.h"
#include "socketserver.h"
#include "util.h"
static ESP8266WiFiMulti wifiMulti;
static SocketServer socketServer;
void setup() {
// serial console, for use via USB (also exposed to TXD0/RXD0 GPIOs)
@@ -43,10 +45,12 @@ void setup() {
// configure HTTP endpoints
configureWebServer();
// don't forget to start the webserver!
// don't forget to start all the services
webServer.begin();
socketServer.begin();
}
void loop() {
webServer.handleClient();
socketServer.handleClient();
}