Mercurial
comparison 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 |
comparison
equal
deleted
inserted
replaced
| 176:fed99fc04e12 | 186:8cf4ec5e2191 |
|---|---|
| 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 |
| 334 extern void Seobeo_Router_Destroy(); | 336 extern void Seobeo_Router_Destroy(); |
| 335 /* Find matching route handler (internal use) */ | 337 /* Find matching route handler (internal use) */ |
| 336 extern Seobeo_Route_Handler Seobeo_Router_Find_Handler(const char *method, const char *path, Seobeo_Request_Entry **pp_request_map, Dowa_Arena *p_arena); | 338 extern Seobeo_Route_Handler Seobeo_Router_Find_Handler(const char *method, const char *path, Seobeo_Request_Entry **pp_request_map, Dowa_Arena *p_arena); |
| 337 /* Send HTTP response from response map (internal use) */ | 339 /* Send HTTP response from response map (internal use) */ |
| 338 extern void Seobeo_Router_Send_Response(Seobeo_Handle *p_handle, Seobeo_Request_Entry *p_response_map, Dowa_Arena *p_arena); | 340 extern void Seobeo_Router_Send_Response(Seobeo_Handle *p_handle, Seobeo_Request_Entry *p_response_map, Dowa_Arena *p_arena); |
| 341 /* Send HTTP response with keep-alive option */ | |
| 342 extern void Seobeo_Router_Send_Response_KeepAlive(Seobeo_Handle *p_handle, Seobeo_Request_Entry *p_response_map, Dowa_Arena *p_arena, boolean keep_alive); | |
| 339 extern char *Seobeo_Web_LoadFile(const char *file_path, size_t *p_file_size); | 343 extern char *Seobeo_Web_LoadFile(const char *file_path, size_t *p_file_size); |
| 344 /* Being a proxy and keeping the client open */ | |
| 340 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); | 345 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); |
| 341 | |
| 342 | 346 |
| 343 // --- Helper functions --- // | 347 // --- Helper functions --- // |
| 344 /* Destroy handle. It will handle all NULL poointers. */ | 348 /* Destroy handle. It will handle all NULL poointers. */ |
| 345 extern void Seobeo_Handle_Destroy(Seobeo_Handle *p_handle); | 349 extern void Seobeo_Handle_Destroy(Seobeo_Handle *p_handle); |
| 346 /* Write to socket from write_buffer in the handle. */ | 350 /* Write to socket from write_buffer in the handle. */ |