diff seobeo/seobeo.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.h	Wed Jan 21 19:32:08 2026 -0800
+++ b/seobeo/seobeo.h	Fri Jan 23 22:38:59 2026 -0800
@@ -62,6 +62,8 @@
 // --- Web --- //
 /* Generate HTTP 1.1 Header value with given content_types and length. */
 extern void           Seobeo_Web_Header_Generate(void *buffer, int status, const char *content_type, const int content_length);
+/* Generate HTTP 1.1 Header with keep-alive option. */
+extern void           Seobeo_Web_Header_Generate_KeepAlive(void *buffer, int status, const char *content_type, const int content_length, boolean keep_alive);
 /* Start a Generic HTTP static file server with given folder. It will store folder into memory. */
 extern int            Seobeo_Web_Server_Start(const char *folder_path, const char *port, Seobeo_ServerMode mode, int thread_count);
 /* Generic HTTP GET Rquest to given host and port with path. It will mimic chrome. */
@@ -336,10 +338,12 @@
 extern Seobeo_Route_Handler  Seobeo_Router_Find_Handler(const char *method, const char *path, Seobeo_Request_Entry **pp_request_map, Dowa_Arena *p_arena);
 /* Send HTTP response from response map (internal use) */
 extern void                  Seobeo_Router_Send_Response(Seobeo_Handle *p_handle, Seobeo_Request_Entry *p_response_map, Dowa_Arena *p_arena);
+/* Send HTTP response with keep-alive option */
+extern void                  Seobeo_Router_Send_Response_KeepAlive(Seobeo_Handle *p_handle, Seobeo_Request_Entry *p_response_map, Dowa_Arena *p_arena, boolean keep_alive);
 extern char                 *Seobeo_Web_LoadFile(const char *file_path, size_t *p_file_size);
+/* Being a proxy and keeping the client open */
 extern Seobeo_Stream_Handler Seobeo_Router_Find_Stream_Handler(const char *method, const char *path, Seobeo_Request_Entry **pp_request_map, Dowa_Arena *p_arena);
 
-
 // --- Helper functions --- //
 /* Destroy handle. It will handle all NULL poointers. */
 extern void           Seobeo_Handle_Destroy(Seobeo_Handle *p_handle);