Skip to content

Made Ethernet useable on 'Esp32 Dev Module'. #107

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions src/Ethernet.h
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,18 @@ class EthernetClient : public Client {
uint8_t status();
virtual int connect(IPAddress ip, uint16_t port);
virtual int connect(const char *host, uint16_t port);
#ifdef ESP32
int connect(IPAddress ip, uint16_t port, int timeout)
{
connect(ip, port);
setConnectionTimeout(timeout);
}
int connect(const char* host, uint16_t port, int timeout)
{
connect(host, port);
setConnectionTimeout(timeout);
}
#endif
virtual int availableForWrite(void);
virtual size_t write(uint8_t);
virtual size_t write(const uint8_t *buf, size_t size);
Expand Down Expand Up @@ -258,6 +270,12 @@ class EthernetServer : public Server {
EthernetClient available();
EthernetClient accept();
virtual void begin();
#ifdef ESP32
void begin(uint16_t port)
{
_port = port;
}
#endif
virtual size_t write(uint8_t);
virtual size_t write(const uint8_t *buf, size_t size);
virtual operator bool();
Expand Down