This is exchanging some websocket messages, now.

git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@4698 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
2023-12-25 23:50:55 +00:00
parent cd43bf9dfa
commit 8ab8335baa
2 changed files with 9 additions and 16 deletions

View File

@ -141,7 +141,6 @@ static JSValue _httpd_response_send(JSContext* context, JSValueConst this_val, i
header += 9;
}
memcpy(copy + header, message, length);
tf_printf("SEND %d\n", (int)length);
tf_http_request_send(request, copy, header + length);
tf_free(copy);
JS_FreeCString(context, message);
@ -150,7 +149,6 @@ static JSValue _httpd_response_send(JSContext* context, JSValueConst this_val, i
static void _httpd_message_callback(tf_http_request_t* request, const void* data, size_t size)
{
tf_printf("message [%.*s]\n", (int)size, (const char*)data);
JSContext* context = request->context;
JSValue response_object = JS_MKPTR(JS_TAG_OBJECT, request->user_data);
JSValue on_message = JS_GetPropertyStr(context, response_object, "onMessage");