WebServer.h how do i know if a client disconnects?
Posted: Sun Mar 17, 2024 8:32 am
My video streaming app does use server.sendContent(); to stream mjpeg pictures. This is done in a loop inside the webserver handler. This loop continues to send even if the client disconnects. How do i prevent this?
Using "WiFiServer" there is client.available() and client.connected() to check this.
Using "esp_http_server.h" the httpd_resp_send_chunk function gives the return ESP_OK on sucess.
How do i replicate this functionality with "WebServer.h"?
Or can i make the OTA updater functional with "WiFiServer" or "esp_http_server.h" ?
Using "WiFiServer" there is client.available() and client.connected() to check this.
Using "esp_http_server.h" the httpd_resp_send_chunk function gives the return ESP_OK on sucess.
How do i replicate this functionality with "WebServer.h"?
Or can i make the OTA updater functional with "WiFiServer" or "esp_http_server.h" ?