Skip to content

Commit ed658f0

Browse files
authored
Update EthernetServer.h
I edited the line: EthernetServer(uint16_t); in EthernetServer(); and I added; virtual void begin(uint16_t); So user can choose in his sketch to use "server.begin();" without parameters and the library will use tcp port 80 as default, or user can use "server.begin(int);" and the webserver will start using the tcp port indicated in the sketch (for example the tcp port can be stored in eprom. At board's startup, it can read the value and use it, while before user must declare a fixed tcp port).
1 parent ae0d9dc commit ed658f0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

libraries/Ethernet/src/EthernetServer.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,9 @@ public Server {
1111
uint16_t _port;
1212
void accept();
1313
public:
14-
EthernetServer(uint16_t);
14+
EthernetServer();
1515
EthernetClient available();
16+
virtual void begin(uint16_t);
1617
virtual void begin();
1718
virtual size_t write(uint8_t);
1819
virtual size_t write(const uint8_t *buf, size_t size);

0 commit comments

Comments
 (0)