Add Bounded Ordinary HTTPS Idle Cleanup
This commit is contained in:
@@ -1,6 +1,19 @@
|
||||
/* SPDX-License-Identifier: GPL-3.0-only */
|
||||
#pragma once
|
||||
#include "esp_http_server.h"
|
||||
#include <stdint.h>
|
||||
|
||||
#define WEB_HTTPD_IDLE_SOCKETS 6U
|
||||
#define WEB_HTTPD_IDLE_TIMEOUT_US INT64_C(15000000)
|
||||
typedef struct {
|
||||
uint64_t completed;
|
||||
int64_t idle_since_us;
|
||||
int fd;
|
||||
bool observed, shutdown_sent;
|
||||
} web_httpd_idle_row_t;
|
||||
/* HTTPD-owner work boundary only. TLS create must invalidate reused fd rows. */
|
||||
void web_httpd_idle_sweep(httpd_handle_t server,
|
||||
web_httpd_idle_row_t rows[WEB_HTTPD_IDLE_SOCKETS], int64_t now);
|
||||
|
||||
/* HTTPD-owner only, before body reads or any response. Reject duplicate lines,
|
||||
* including Cookie, rather than trusting first-match public getters. */
|
||||
|
||||
Reference in New Issue
Block a user