获取指定参数名的值(字符串格式)httpd_req_recv:从HTTP请求接收数据httpd_req_send:发送HTTP响应数据httpd_resp_set_type:设置HTTP响应内容的MIME类型httpd_resp_send_chunk:分块发送HTTP响应数据。
res = httpd_resp_send_chunk(req, (const char *)_jpg_buf, _jpg_buf_len); } if (fb) { esp_camera_fb_return(fb); fb = NULL; _jpg_buf = NULL; } else if (_jpg_buf) { free(_jpg_buf); _jpg_buf = NULL; } if (res != ESP_OK) { log_e("Send frame failed"); break; ...
res=httpd_resp_send_chunk(req, (const char*)part_buf, hlen); } if(res==ESP_OK){ res=httpd_resp_send_chunk(req, (const char*)_jpg_buf, _jpg_buf_len); } if(res==ESP_OK){ res=httpd_resp_send_chunk(req, _STREAM_BOUNDARY, strlen(_STREAM_BOUNDARY)); } if(fb){ esp_camera_f...
if ((ret = httpd_req_recv(req, buf, MIN(remaining, sizeof(buf))) <= 0) { if (ret == HTTPD_SOCK_ERR_TIMEOUT) { /* Retry receiving if timeout occurred */ continue; } return ESP_FAIL; } /* Send back the same data */ httpd_resp_send_chunk(req, "The is rev to data", r...
res = httpd_resp_send_chunk(req, (const char *)part_buf, hlen); } if(res == ESP_OK){ res = httpd_resp_send_chunk(req, (const char *)_jpg_buf, _jpg_buf_len); } if(res == ESP_OK){ res = httpd_resp_send_chunk(req, _STREAM_BOUNDARY, strlen(_STREAM_BOUNDARY)); ...
{ /* 如果发生超时,重试接收 */ continue; } return ESP_FAIL; } /* 发回相同的数据 */ httpd_resp_send_chunk(req, buf, ret); remaining -= ret; esp_err_t ret = httpd_query_key_value(buf, "ssid", wifi_name, sizeof(wifi_name)); if (ret == ESP_OK) { char str[32]; memcpy(...
res = httpd_resp_send_chunk(req, (const char *)_jpg_buf, _jpg_buf_len); } if(res == ESP_OK){ res = httpd_resp_send_chunk(req, _STREAM_BOUNDARY, strlen (_STREAM_BOUNDARY)); } if(fb){ esp_camera_fb_return(fb); fb = NULL; ...
res=httpd_resp_send_chunk(req,(constchar*)part_buf,hlen); } if(res==ESP_OK){ res=httpd_resp_send_chunk(req,(constchar*)_jpg_buf,_jpg_buf_len); } if(res==ESP_OK){ res=httpd_resp_send_chunk(req,_STREAM_BOUNDARY,strlen(_STREAM_BOUNDARY)); ...
if (ret == HTTPD_SOCK_ERR_TIMEOUT) { /* Retry receiving if timeout occurred */ continue; } return ESP_FAIL; } /* Send back the same data */ httpd_resp_send_chunk(req, buf, ret); remaining -= ret; /* Log data received */ ESP_LOGI(TAG, ...
res = httpd_resp_send_chunk(req, (const char *)part_buf, hlen); } if(res == ESP_OK){ res = httpd_resp_send_chunk(req, (const char *)_jpg_buf, _jpg_buf_len); } if(res == ESP_OK){ res = httpd_resp_send_chunk(req, _STREAM_BOUNDARY, strlen(_STREAM_BOUNDARY)); ...