Closed kmpelectronics closed 5 years ago
my comment there https://github.com/espressif/arduino-esp32/commit/9a9ff622166149da30dd13a81485184617c56387#commitcomment-33292990
the PR should be closed, not be merged
Dear @jandrassy
Why this method
virtual int connect(IPAddress ip, uint16_t port, int timeout);
has been added in ESP32 release v 1.0.2?
Also what about do you say for
virtual void begin(uint16_t port = 0);
method?
It isn't implemented in Arduino Ethernet.h.
How do we fix the problem with it implementation?
Dear @jandrassy Why this method
virtual int connect(IPAddress ip, uint16_t port, int timeout);
has been added in ESP32 release v 1.0.2? Also what about do you say forvirtual void begin(uint16_t port = 0);
method? It isn't implemented in Arduino Ethernet.h. How do we fix the problem with it implementation?
the ESP32 package should be fixed. they should not change the Arduino API classes
The method EthernetServer::init()
prevent of duplicating the same code in EthernetServer::begin(uint16_t port)
and EthernetServer::begin()
methods.
The method
EthernetServer::init()
prevent of duplicating the same code inEthernetServer::begin(uint16_t port)
andEthernetServer::begin()
methods.
Ethernet.init(pin) sets the CS pin
Where is the problem with EthernetServer::init()
it inherits Server and doesn't have connection with Ethernet.init(pin)
... Do you have any ideas about the name of the private method EthernetServer.init()?
Where is the problem with
EthernetServer::init()
it inherits Server and doesn't have connection withEthernet.init(pin)
... Do you have any ideas about the name of the private method EthernetServer.init()?
sorry. yes. I mixed it. And what should be server.init()? EthernetServer has a constructor. init() is usually for additional initialisation of objects instanced in a library.
I have removed EthernetClient::connect() specific method for ESP32 and renamed from EthernetServer::init()
to EthernetServer::initSocket()
@kmpelectronics, port is specified in constructor. The ESP32 core changed Arduino API Server
class's virtual void begin();
and should change it back to be without parameter as all networking libraries expect it in derived Server classes. Make a PR there.
OK, I will close this PR. But you should know this library does not work together with ESP32.
We have added ESP32 support in Ethernet 2.0.0 library. Especially for ESP32 v1.0.2. You can delete our comments where they are necessary.