Mercurial
diff seobeo/seobeo_internal.h @ 186:8cf4ec5e2191 hg-web
Fixed merge conflict.
| author | MrJuneJune <me@mrjunejune.com> |
|---|---|
| date | Fri, 23 Jan 2026 22:38:59 -0800 |
| parents | 71ad34a8bc9a a8976a008a9d |
| children |
line wrap: on
line diff
--- a/seobeo/seobeo_internal.h Wed Jan 21 19:32:08 2026 -0800 +++ b/seobeo/seobeo_internal.h Fri Jan 23 22:38:59 2026 -0800 @@ -24,9 +24,9 @@ } Seobeo_SocketType; typedef struct { - int32 socket; + int32 socket; Seobeo_SocketType type; - boolean connected; + boolean connected; char *host; char *port; @@ -37,7 +37,7 @@ uint8 *read_buffer; uint32 read_buffer_capacity; uint32 read_buffer_len; // current size - uint32 read_buffer_used; // TODO: Implement this for client + uint32 read_buffer_used; // TODO: Implement this for client uint8 *write_buffer; uint32 write_buffer_capacity; @@ -48,6 +48,10 @@ char *file_name; atomic_bool destroyed; + + // Keep-alive support + time_t last_activity; // Timestamp of last request/response + boolean keep_alive; // Whether this connection should be kept alive } Seobeo_Handle; // Cached file entry with content and size (for binary file support) @@ -94,7 +98,8 @@ extern int Seobeo_Web_Header_Parse(Seobeo_Handle *p_handle, Seobeo_Request_Entry **pp_map, Dowa_Arena *p_arena); // --- Handle Request --- // -extern void Seobeo_Web_HandleClientRequest(Seobeo_Handle *cli, Seobeo_Cache_Entry *p_html_cache); +/* Handle a client request. Returns TRUE if connection should be kept alive. */ +extern boolean Seobeo_Web_ClientHandle_Request(Seobeo_Handle *p_cli_handle, Seobeo_Cache_Entry *p_html_cache, boolean use_keep_alive); // --- SSL --- // extern void Seobeo_Web_SSL_Init();