Skip to content

Missing close() methods for WifiServer and WiFiWebServer #1167

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
drmpf opened this issue Dec 7, 2015 · 1 comment
Closed

Missing close() methods for WifiServer and WiFiWebServer #1167

drmpf opened this issue Dec 7, 2015 · 1 comment

Comments

@drmpf
Copy link

drmpf commented Dec 7, 2015

I need to close my server on port 80 and open a webserver on port 80 and visa versa

Looks like I need to add

void WiFiServer::close() {
    if (!_pcb) {
      return;
    }  
    tcp_close(_pcb);
}

and

void ESP8266WebServer::close() {
  _server.close();
}

or is there another way?

@drmpf
Copy link
Author

drmpf commented Dec 7, 2015

Actually even this did not work. When finished with webserver on port 80 and try to start server on 4989 still have something running on port 80.
How do I shut down the webserver listening on port 80. It appears as though the server is starting correctly but just not on the correct port (4989) instead it starts on 80

The above close methods did work, the 80 was just a testing code artifact

Links2004 added a commit to Links2004/Arduino that referenced this issue Dec 10, 2015
add close and stop as alias
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant