Port to uWS v0.16a1

This commit is contained in:
Alex Hultman 2019-06-12 12:50:05 +02:00
parent 62fb7d46fe
commit 83ad1353fd
3 changed files with 7 additions and 4 deletions

View File

@ -227,7 +227,7 @@ void uWS_App(const FunctionCallbackInfo<Value> &args) {
appTemplate->SetClassName(String::NewFromUtf8(isolate, "uWS.SSLApp")); appTemplate->SetClassName(String::NewFromUtf8(isolate, "uWS.SSLApp"));
/* We fill these below */ /* We fill these below */
us_new_socket_context_options_t ssl_options = {}; us_socket_context_options_t ssl_options = {};
static std::string keyFileName; static std::string keyFileName;
static std::string certFileName; static std::string certFileName;

View File

@ -53,9 +53,12 @@ void uWS_free(const FunctionCallbackInfo<Value> &args) {
/* todo: Put this function and all inits of it in its own header */ /* todo: Put this function and all inits of it in its own header */
void uWS_us_listen_socket_close(const FunctionCallbackInfo<Value> &args) { void uWS_us_listen_socket_close(const FunctionCallbackInfo<Value> &args) {
us_listen_socket_close((struct us_listen_socket *) External::Cast(*args[0])->Value()); // this should take int ssl first
us_listen_socket_close(0, (struct us_listen_socket_t *) External::Cast(*args[0])->Value());
} }
#include <uv.h>
void Main(Local<Object> exports) { void Main(Local<Object> exports) {
/* I guess we store this statically */ /* I guess we store this statically */
isolate = exports->GetIsolate(); isolate = exports->GetIsolate();
@ -65,7 +68,7 @@ void Main(Local<Object> exports) {
isolate->SetMicrotasksPolicy(MicrotasksPolicy::kAuto); isolate->SetMicrotasksPolicy(MicrotasksPolicy::kAuto);
/* Integrate with existing libuv loop, we just pass a boolean basically */ /* Integrate with existing libuv loop, we just pass a boolean basically */
uWS::Loop::get((void *) 1); uWS::Loop::get(uv_default_loop());
// instead, for now we call this manually like before: // instead, for now we call this manually like before:
/*uWS::Loop::get()->setPostHandler([](uWS::Loop *) { /*uWS::Loop::get()->setPostHandler([](uWS::Loop *) {

@ -1 +1 @@
Subproject commit bc6ea664b17fb3736e1330e908aee00c4f3a750b Subproject commit 4f803182ec8d6020a8822f71d78d999bf2fda617