From 15f9f81b5a8398fefca023e90d8d1c168ecef620 Mon Sep 17 00:00:00 2001 From: Dirk Engling Date: Fri, 30 Oct 2026 23:11:41 +0100 Subject: Introduce a fast path assuming that a tcp connection's payload already has arrived at accept time --- ot_http.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'ot_http.h') diff --git a/ot_http.h b/ot_http.h index ba16de4..82d645b 100644 --- a/ot_http.h +++ b/ot_http.h @@ -22,7 +22,8 @@ typedef enum { STRUCT_HTTP_FLAG_ZSTD = 8, STRUCT_HTTP_FLAG_CHUNKED = 16, STRUCT_HTTP_FLAG_CHUNKED_IN_TRANSFER = 32, - STRUCT_HTTP_FLAG_KEEPALIVE = 64 + STRUCT_HTTP_FLAG_KEEPALIVE = 64, + STRUCT_HTTP_FLAG_ONSTACK = 128 } STRUCT_HTTP_FLAG; struct http_data { @@ -39,6 +40,10 @@ void http_interest_set(const int64_t s, struct http_data *cookie, int /* Close a connection and release everything that belongs to it */ void http_close(const int64_t s); +/* Promote a stack cookie to a heap one for persistence and handing it over + to the event loop. */ +int http_adopt(const int64_t s, struct http_data *cookie); + ssize_t http_handle_request(const int64_t s, struct ot_workstruct *ws); ssize_t http_sendiovecdata(const int64_t s, struct ot_workstruct *ws, size_t iovec_entries, struct iovec *iovector, int is_partial); ssize_t http_issue_error(const int64_t s, struct ot_workstruct *ws, int code); -- cgit v1.3