Skip to content

Commit c8fe12e

Browse files
committed
Add compatibility wrapper for begin(uint16_t port) function.
1 parent 64c0e43 commit c8fe12e

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

src/Ethernet.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,7 @@ class EthernetServer : public Server {
258258
EthernetClient available();
259259
EthernetClient accept();
260260
virtual void begin();
261+
void begin(uint16_t port);
261262
virtual size_t write(uint8_t);
262263
virtual size_t write(const uint8_t *buf, size_t size);
263264
virtual operator bool();

src/EthernetServer.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,12 @@ void EthernetServer::begin()
3737
}
3838
}
3939

40+
void EthernetServer::begin(uint16_t port)
41+
{
42+
_port = port;
43+
begin();
44+
}
45+
4046
EthernetClient EthernetServer::available()
4147
{
4248
bool listening = false;

0 commit comments

Comments
 (0)