File tree Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -74,6 +74,21 @@ uint8_t WiFiServer::begin(uint8_t opt)
74
74
return 1 ;
75
75
}
76
76
77
+ void WiFiServer::end ()
78
+ {
79
+ if (_socket != -1 ) {
80
+ for (SOCKET s = 0 ; s < TCP_SOCK_MAX; s++) {
81
+ if (WiFiSocket.hasParent (_socket, s)) {
82
+ WiFiSocket.close (s);
83
+ }
84
+ }
85
+ if (WiFiSocket.listening (_socket)) {
86
+ WiFiSocket.close (_socket);
87
+ _socket = -1 ;
88
+ }
89
+ }
90
+ }
91
+
77
92
WiFiClient WiFiServer::available (uint8_t * status)
78
93
{
79
94
if (status != NULL ) {
Original file line number Diff line number Diff line change @@ -37,6 +37,7 @@ class WiFiServer : public Server {
37
37
WiFiClient available (uint8_t * status = NULL );
38
38
void begin ();
39
39
uint8_t beginSSL ();
40
+ void end ();
40
41
virtual size_t write (uint8_t );
41
42
virtual size_t write (const uint8_t *buf, size_t size);
42
43
uint8_t status ();
You can’t perform that action at this time.
0 commit comments