comparison seobeo/seobeo.h @ 183:a8976a008a9d

[BenchMark] Added bun bench mark to test seoboe vs other popular benchmarks.
author MrJuneJune <me@mrjunejune.com>
date Fri, 23 Jan 2026 21:19:08 -0800
parents 058de208e640
children 8cf4ec5e2191
comparison
equal deleted inserted replaced
179:8d17f6e6e290 183:a8976a008a9d
60 extern Seobeo_Handle *Seobeo_Stream_Handle_Server_Accept(Seobeo_Handle *p_server_handle); 60 extern Seobeo_Handle *Seobeo_Stream_Handle_Server_Accept(Seobeo_Handle *p_server_handle);
61 61
62 // --- Web --- // 62 // --- Web --- //
63 /* Generate HTTP 1.1 Header value with given content_types and length. */ 63 /* Generate HTTP 1.1 Header value with given content_types and length. */
64 extern void Seobeo_Web_Header_Generate(void *buffer, int status, const char *content_type, const int content_length); 64 extern void Seobeo_Web_Header_Generate(void *buffer, int status, const char *content_type, const int content_length);
65 /* Generate HTTP 1.1 Header with keep-alive option. */
66 extern void Seobeo_Web_Header_Generate_KeepAlive(void *buffer, int status, const char *content_type, const int content_length, boolean keep_alive);
65 /* Start a Generic HTTP static file server with given folder. It will store folder into memory. */ 67 /* Start a Generic HTTP static file server with given folder. It will store folder into memory. */
66 extern int Seobeo_Web_Server_Start(const char *folder_path, const char *port, Seobeo_ServerMode mode, int thread_count); 68 extern int Seobeo_Web_Server_Start(const char *folder_path, const char *port, Seobeo_ServerMode mode, int thread_count);
67 /* Generic HTTP GET Rquest to given host and port with path. It will mimic chrome. */ 69 /* Generic HTTP GET Rquest to given host and port with path. It will mimic chrome. */
68 extern int Seobeo_Web_Client_Get(const char *host, const char *port, const char *path); 70 extern int Seobeo_Web_Client_Get(const char *host, const char *port, const char *path);
69 71
329 extern void Seobeo_Router_Destroy(); 331 extern void Seobeo_Router_Destroy();
330 /* Find matching route handler (internal use) */ 332 /* Find matching route handler (internal use) */
331 extern Seobeo_Route_Handler Seobeo_Router_Find_Handler(const char *method, const char *path, Seobeo_Request_Entry **pp_request_map, Dowa_Arena *p_arena); 333 extern Seobeo_Route_Handler Seobeo_Router_Find_Handler(const char *method, const char *path, Seobeo_Request_Entry **pp_request_map, Dowa_Arena *p_arena);
332 /* Send HTTP response from response map (internal use) */ 334 /* Send HTTP response from response map (internal use) */
333 extern void Seobeo_Router_Send_Response(Seobeo_Handle *p_handle, Seobeo_Request_Entry *p_response_map, Dowa_Arena *p_arena); 335 extern void Seobeo_Router_Send_Response(Seobeo_Handle *p_handle, Seobeo_Request_Entry *p_response_map, Dowa_Arena *p_arena);
336 /* Send HTTP response with keep-alive option */
337 extern void Seobeo_Router_Send_Response_KeepAlive(Seobeo_Handle *p_handle, Seobeo_Request_Entry *p_response_map, Dowa_Arena *p_arena, boolean keep_alive);
334 extern char *Seobeo_Web_LoadFile(const char *file_path, size_t *p_file_size); 338 extern char *Seobeo_Web_LoadFile(const char *file_path, size_t *p_file_size);
335 339
336 // --- Helper functions --- // 340 // --- Helper functions --- //
337 /* Destroy handle. It will handle all NULL poointers. */ 341 /* Destroy handle. It will handle all NULL poointers. */
338 extern void Seobeo_Handle_Destroy(Seobeo_Handle *p_handle); 342 extern void Seobeo_Handle_Destroy(Seobeo_Handle *p_handle);