Mercurial
diff seobeo/seobeo.h @ 185:dfdd66825396
Merged in keep alive changes and mrjunejune changes.
| author | MrJuneJune <me@mrjunejune.com> |
|---|---|
| date | Fri, 23 Jan 2026 22:22:30 -0800 |
| parents | a8976a008a9d |
| children | 8cf4ec5e2191 |
line wrap: on
line diff
--- a/seobeo/seobeo.h Fri Jan 23 21:09:49 2026 -0800 +++ b/seobeo/seobeo.h Fri Jan 23 22:22:30 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. */ @@ -331,6 +333,8 @@ 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); // --- Helper functions --- //