forked from cory/tildefriends
Delete httpd.js.
git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@4709 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
@ -293,8 +293,8 @@ static JSValue _httpd_start(JSContext* context, JSValueConst this_val, int argc,
|
||||
int port = 0;
|
||||
JS_ToInt32(context, &port, argv[0]);
|
||||
tf_tls_context_t* tls = tf_tls_context_get(JS_DupValue(context, argv[1]));
|
||||
tf_http_listen(http, port, tls);
|
||||
return JS_UNDEFINED;
|
||||
int assigned_port = tf_http_listen(http, port, tls);
|
||||
return JS_NewInt32(context, assigned_port);
|
||||
}
|
||||
|
||||
void _httpd_finalizer(JSRuntime* runtime, JSValue value)
|
||||
@ -343,6 +343,6 @@ void tf_httpd_register(JSContext* context)
|
||||
JS_SetPropertyStr(context, httpd, "all", JS_NewCFunction(context, _httpd_all, "all", 2));
|
||||
JS_SetPropertyStr(context, httpd, "registerSocketHandler", JS_NewCFunction(context, _httpd_register_socket_handler, "register_socket_handler", 2));
|
||||
JS_SetPropertyStr(context, httpd, "start", JS_NewCFunction(context, _httpd_start, "start", 2));
|
||||
JS_SetPropertyStr(context, global, "httpdc", httpd);
|
||||
JS_SetPropertyStr(context, global, "httpd", httpd);
|
||||
JS_FreeValue(context, global);
|
||||
}
|
||||
|
Reference in New Issue
Block a user