Minor cleanup. Make http.c trace its callbacks.

git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@4728 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
2024-01-03 02:14:17 +00:00
parent 7516524d69
commit 34a87d8b3b
3 changed files with 25 additions and 25 deletions

View File

@ -7,6 +7,7 @@ typedef struct _tf_http_connection_t tf_http_connection_t;
typedef struct _tf_http_request_t tf_http_request_t;
typedef struct _tf_http_t tf_http_t;
typedef struct _tf_tls_context_t tf_tls_context_t;
typedef struct _tf_trace_t tf_trace_t;
typedef struct uv_loop_s uv_loop_t;
typedef void (tf_http_message_callback)(tf_http_request_t* request, int op_code, const void* data, size_t size);
@ -33,6 +34,7 @@ typedef void (tf_http_callback_t)(tf_http_request_t* request);
typedef void (tf_http_cleanup_t)(void* user_data);
tf_http_t* tf_http_create(uv_loop_t* loop);
void tf_http_set_trace(tf_http_t* http, tf_trace_t* trace);
int tf_http_listen(tf_http_t* http, int port, tf_tls_context_t* tls);
void tf_http_add_handler(tf_http_t* http, const char* pattern, tf_http_callback_t* callback, void* user_data);
void tf_http_respond(tf_http_request_t* request, int status, const char** headers, int headers_count, const void* body, size_t content_length);