Additions to WiFiClient and WiFiServer (#404)

Required for WebServer and/or DNSServer libraries
This commit is contained in:
bbx10
2017-06-14 01:22:16 -07:00
committed by Me No Dev
parent 6af648e8f5
commit b05c7dfa59
4 changed files with 22 additions and 1 deletions

View File

@ -21,6 +21,7 @@
#include <lwip/netdb.h>
#undef write
#undef close
int WiFiServer::setTimeout(uint32_t seconds){
struct timeval tv;
@ -103,8 +104,16 @@ bool WiFiServer::hasClient() {
}
void WiFiServer::end(){
close(sockfd);
lwip_close_r(sockfd);
sockfd = -1;
_listening = false;
}
void WiFiServer::close(){
end();
}
void WiFiServer::stop(){
end();
}