esp-rs / esp-idf-svc

Type-Safe Rust Wrappers for various ESP-IDF services (WiFi, Network, Httpd, Logging, etc.)
https://docs.esp-rs.org/esp-idf-svc/
Apache License 2.0
332 stars 183 forks source link

Exposes ctrl_port in the configuration of an HttpServer #427

Closed Angelo13C closed 6 months ago

Angelo13C commented 6 months ago

Hi! I am making an IP camera using an ESP32CAM, and I need to have 2 HTTP servers. The first one handles most of the requests (like index...) but then I need a second one which only handles the /stream which is going to have a loop inside that continuously sends the images to the HTTP client (check this: https://stackoverflow.com/questions/47729941/mjpeg-over-http-specification).

If I only have 1 server as soon as I receive a /stream request everything is blocked (because of the loop). The problem now is that since ctrl_port is hidden from Rust, I can't start a second server since the ctrl_port is already occupied by the first one.

Vollbrecht commented 6 months ago

LGTM!