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

get rid of wifi client, directly use the socket api

This commit is contained in:
wellenvogel
2021-12-28 18:08:06 +01:00
parent fb435499a1
commit 61e0e66acb
2 changed files with 397 additions and 191 deletions

View File

@@ -6,18 +6,19 @@
#include <memory>
#include <WiFi.h>
using wiFiClientPtr = std::shared_ptr<WiFiClient>;
class GwClient;
using gwClientPtr = std::shared_ptr<GwClient>;
class GwSocketServer{
private:
const GwConfigHandler *config;
GwLog *logger;
gwClientPtr *clients=NULL;
WiFiServer *server=NULL;
GwClient **clients=NULL;
int listener=-1;
int listenerPort=-1;
bool allowReceive;
int maxClients;
int minId;
bool createListener();
int available();
public:
GwSocketServer(const GwConfigHandler *config,GwLog *logger,int minId);
~GwSocketServer();