Refactor using new uSockets API

This commit is contained in:
Alex Hultman
2019-01-25 14:15:40 +01:00
parent e14461e253
commit d331ec3e45
10 changed files with 107 additions and 198 deletions
+2 -2
View File
@@ -28,7 +28,7 @@ int main(int argc, char **argv) {
};
int port = 3000;
struct us_ssl_socket_context_options ssl_options = {};
struct us_new_socket_context_options_t ssl_options = {};
while ((option = optparse_long(&options, longopts, nullptr)) != -1) {
switch (option) {
@@ -63,7 +63,7 @@ int main(int argc, char **argv) {
AsyncFileStreamer asyncFileStreamer(root);
/* Either serve over HTTP or HTTPS */
struct us_ssl_socket_context_options empty_ssl_options = {};
struct us_new_socket_context_options_t empty_ssl_options = {};
if (memcmp(&ssl_options, &empty_ssl_options, sizeof(empty_ssl_options))) {
/* HTTPS */
uWS::SSLApp(ssl_options).get("/*", [&asyncFileStreamer](auto *res, auto *req) {