From 83ad1353fd8f9c3326eb6d9a94655d5b82cada90 Mon Sep 17 00:00:00 2001 From: Alex Hultman Date: Wed, 12 Jun 2019 12:50:05 +0200 Subject: [PATCH] Port to uWS v0.16a1 --- src/AppWrapper.h | 2 +- src/addon.cpp | 7 +++++-- uWebSockets | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/AppWrapper.h b/src/AppWrapper.h index ae2ddf5..581d66c 100644 --- a/src/AppWrapper.h +++ b/src/AppWrapper.h @@ -227,7 +227,7 @@ void uWS_App(const FunctionCallbackInfo &args) { appTemplate->SetClassName(String::NewFromUtf8(isolate, "uWS.SSLApp")); /* 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 certFileName; diff --git a/src/addon.cpp b/src/addon.cpp index eaaa43a..fd350a8 100644 --- a/src/addon.cpp +++ b/src/addon.cpp @@ -53,9 +53,12 @@ void uWS_free(const FunctionCallbackInfo &args) { /* todo: Put this function and all inits of it in its own header */ void uWS_us_listen_socket_close(const FunctionCallbackInfo &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 + void Main(Local exports) { /* I guess we store this statically */ isolate = exports->GetIsolate(); @@ -65,7 +68,7 @@ void Main(Local exports) { isolate->SetMicrotasksPolicy(MicrotasksPolicy::kAuto); /* 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: /*uWS::Loop::get()->setPostHandler([](uWS::Loop *) { diff --git a/uWebSockets b/uWebSockets index bc6ea66..4f80318 160000 --- a/uWebSockets +++ b/uWebSockets @@ -1 +1 @@ -Subproject commit bc6ea664b17fb3736e1330e908aee00c4f3a750b +Subproject commit 4f803182ec8d6020a8822f71d78d999bf2fda617