sstaub / Ethernet3

Ethernet library for Arduino and Ethernetshield2 / WIZ550io / WIZ850io / USR-ES1 with Wiznet W5500 chip
Other
76 stars 34 forks source link

Unable to create the server #41

Closed biswaKL closed 2 years ago

biswaKL commented 3 years ago

In ESP32, I have added W5500 Want to use both Wifi and LAN

While Compiling I am getting this Error.

cannot declare variable 'server' to be of abstract type 'EthernetServer'

biswaKL commented 3 years ago

I Modified the server library a bit. and now looks fine

#ifndef ethernetserver_h
#define ethernetserver_h

#include "Server.h"

class EthernetClient;

class EthernetServer : public Server
{
private:
  uint16_t _port;
  void accept();

public:
  // EthernetServer(uint16_t port);
  EthernetClient available();
  void begin(uint16_t port = 0);
  size_t write(uint8_t);
  size_t write(const uint8_t *buf, size_t size);
  using Print::write;
};

#endif
sstaub commented 3 years ago

How did you use the variable server? which context? is the variable also a class name? Did you tried another variable name?