1
0
mirror of https://github.com/thooge/esp32-nmea2000-obp60.git synced 2025-12-16 07:23:07 +01:00

use static list of client connections in socket server

This commit is contained in:
andreas
2021-10-25 19:46:53 +02:00
parent c893025cd3
commit 8c02b21277
2 changed files with 99 additions and 41 deletions

View File

@@ -2,7 +2,6 @@
#define _GWSOCKETSERVER_H
#include "GWConfig.h"
#include "GwLog.h"
#include <list>
#include <memory>
#include <WiFi.h>
@@ -13,10 +12,12 @@ class GwSocketServer{
private:
const GwConfigHandler *config;
GwLog *logger;
std::list<gwClientPtr> clients;
gwClientPtr *clients;
WiFiServer *server=NULL;
int maxClients;
public:
GwSocketServer(const GwConfigHandler *config,GwLog *logger);
~GwSocketServer();
void begin();
void loop();
void sendToClients(const char *buf);