summaryrefslogtreecommitdiff
path: root/ot_http.h
diff options
context:
space:
mode:
authorDirk Engling <erdgeist@erdgeist.org>2026-10-30 23:11:41 +0100
committerDirk Engling <erdgeist@erdgeist.org>2026-10-30 23:11:41 +0100
commit15f9f81b5a8398fefca023e90d8d1c168ecef620 (patch)
tree5661bcf9e01ea89784de285ae27312a1e752167d /ot_http.h
parent36e396fd30bf098fa2459f11f4dd4430f7a8396e (diff)
Introduce a fast path assuming that a tcp connection's payload already has arrived at accept time
Diffstat (limited to 'ot_http.h')
-rw-r--r--ot_http.h7
1 files changed, 6 insertions, 1 deletions
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 {
22 STRUCT_HTTP_FLAG_ZSTD = 8, 22 STRUCT_HTTP_FLAG_ZSTD = 8,
23 STRUCT_HTTP_FLAG_CHUNKED = 16, 23 STRUCT_HTTP_FLAG_CHUNKED = 16,
24 STRUCT_HTTP_FLAG_CHUNKED_IN_TRANSFER = 32, 24 STRUCT_HTTP_FLAG_CHUNKED_IN_TRANSFER = 32,
25 STRUCT_HTTP_FLAG_KEEPALIVE = 64 25 STRUCT_HTTP_FLAG_KEEPALIVE = 64,
26 STRUCT_HTTP_FLAG_ONSTACK = 128
26} STRUCT_HTTP_FLAG; 27} STRUCT_HTTP_FLAG;
27 28
28struct http_data { 29struct http_data {
@@ -39,6 +40,10 @@ void http_interest_set(const int64_t s, struct http_data *cookie, int
39/* Close a connection and release everything that belongs to it */ 40/* Close a connection and release everything that belongs to it */
40void http_close(const int64_t s); 41void http_close(const int64_t s);
41 42
43/* Promote a stack cookie to a heap one for persistence and handing it over
44 to the event loop. */
45int http_adopt(const int64_t s, struct http_data *cookie);
46
42ssize_t http_handle_request(const int64_t s, struct ot_workstruct *ws); 47ssize_t http_handle_request(const int64_t s, struct ot_workstruct *ws);
43ssize_t http_sendiovecdata(const int64_t s, struct ot_workstruct *ws, size_t iovec_entries, struct iovec *iovector, int is_partial); 48ssize_t http_sendiovecdata(const int64_t s, struct ot_workstruct *ws, size_t iovec_entries, struct iovec *iovector, int is_partial);
44ssize_t http_issue_error(const int64_t s, struct ot_workstruct *ws, int code); 49ssize_t http_issue_error(const int64_t s, struct ot_workstruct *ws, int code);