File tree Expand file tree Collapse file tree 2 files changed +19
-5
lines changed Expand file tree Collapse file tree 2 files changed +19
-5
lines changed Original file line number Diff line number Diff line change @@ -30,15 +30,27 @@ WiFiServer::WiFiServer(uint16_t port) :
30
30
31
31
void WiFiServer::begin ()
32
32
{
33
- begin (0 );
33
+ beginOpt (0 );
34
34
}
35
35
36
36
uint8_t WiFiServer::beginSSL ()
37
37
{
38
- return begin (SOCKET_FLAGS_SSL);
38
+ return beginOpt (SOCKET_FLAGS_SSL);
39
39
}
40
40
41
- uint8_t WiFiServer::begin (uint8_t opt)
41
+ void WiFiServer::begin (uint16_t port)
42
+ {
43
+ _port = port;
44
+ beginOpt (0 );
45
+ }
46
+
47
+ uint8_t WiFiServer::beginSSL (uint16_t port)
48
+ {
49
+ _port = port;
50
+ return beginOpt (SOCKET_FLAGS_SSL);
51
+ }
52
+
53
+ uint8_t WiFiServer::beginOpt (uint8_t opt)
42
54
{
43
55
struct sockaddr_in addr;
44
56
Original file line number Diff line number Diff line change @@ -30,13 +30,15 @@ class WiFiServer : public Server {
30
30
private:
31
31
SOCKET _socket;
32
32
uint16_t _port;
33
- uint8_t begin (uint8_t opt);
33
+ uint8_t beginOpt (uint8_t opt);
34
34
35
35
public:
36
- WiFiServer (uint16_t );
36
+ WiFiServer (uint16_t port = 80 );
37
37
WiFiClient available (uint8_t * status = NULL );
38
38
void begin ();
39
39
uint8_t beginSSL ();
40
+ void begin (uint16_t port);
41
+ uint8_t beginSSL (uint16_t port);
40
42
virtual size_t write (uint8_t );
41
43
virtual size_t write (const uint8_t *buf, size_t size);
42
44
uint8_t status ();
You can’t perform that action at this time.
0 commit comments