Refactor using new uSockets API
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user