ethernet webserver works too

This commit is contained in:
technyon
2022-04-29 21:16:09 +02:00
parent 0e9baed3a4
commit 5b12e54be0
12 changed files with 263 additions and 13 deletions

View File

@@ -0,0 +1,35 @@
#pragma once
#include "EthServer.h"
#include "W5500EthClient.h"
#include <WiFiServer.h>
#include <EthernetServer.h>
class EthernetServerImpl : public EthernetServer
{
public:
EthernetServerImpl(int address, int port);
explicit EthernetServerImpl(int port);
virtual void begin(uint16_t port);
};
class W5500EthServer : public EthServer
{
public:
W5500EthServer(IPAddress address, int port);
explicit W5500EthServer(int port);
virtual EthClient* available();
virtual void discardClient();
virtual void begin(const int port = 80);
virtual void close();
virtual void setNoDelay(const bool value);
private:
EthernetServerImpl _ethServer;
EthernetClient _ethClient;
W5500EthClient* _W5500EthClient = nullptr;
};