File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -64,6 +64,12 @@ void UIPServer::begin()
64
64
listening = true ;
65
65
}
66
66
67
+ void UIPServer::begin (uint16_t port)
68
+ {
69
+ _port = port;
70
+ begin ();
71
+ }
72
+
67
73
void UIPServer::end () {
68
74
uip_unlisten (_port);
69
75
listening = false ;
Original file line number Diff line number Diff line change 24
24
class EthernetServer {
25
25
26
26
public:
27
- EthernetServer (uint16_t );
27
+ EthernetServer (uint16_t port = 80 );
28
28
EthernetClient available ();
29
29
EthernetClient accept ();
30
30
void begin ();
31
+ void begin (uint16_t port);
31
32
void end ();
32
33
operator bool ();
33
34
@@ -42,7 +43,7 @@ class EthernetServer {
42
43
class EthernetServerPrint : public EthernetServer , public Print {
43
44
44
45
public:
45
- EthernetServerPrint (uint16_t port) : EthernetServer(port) {}
46
+ EthernetServerPrint (uint16_t port = 80 ) : EthernetServer(port) {}
46
47
47
48
virtual size_t write (uint8_t );
48
49
virtual size_t write (const uint8_t *buf, size_t size);
You can’t perform that action at this time.
0 commit comments