Bugs galore, but this is sending and receiving some websocket messages.

git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@4697 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
2023-12-25 23:39:16 +00:00
parent ccebf831e7
commit cd43bf9dfa
3 changed files with 41 additions and 8 deletions

View File

@ -5,6 +5,7 @@
typedef struct uv_loop_s uv_loop_t;
typedef struct _tf_http_t tf_http_t;
typedef struct _tf_http_connection_t tf_http_connection_t;
typedef struct _tf_http_request_t tf_http_request_t;
typedef enum _tf_http_callback_phase_t
{
@ -12,6 +13,8 @@ typedef enum _tf_http_callback_phase_t
k_http_callback_phase_request_done,
} tf_http_callback_phase_t;
typedef void (tf_http_message_callback)(tf_http_request_t* request, const void* data, size_t size);
typedef struct _tf_http_request_t
{
tf_http_callback_phase_t phase;
@ -24,6 +27,8 @@ typedef struct _tf_http_request_t
size_t content_length;
struct phr_header* headers;
int headers_count;
tf_http_message_callback* on_message;
void* context;
void* user_data;
int ref_count;
} tf_http_request_t;