use SocketContextOptions type so HttpServer example will build again (#1397)

This commit is contained in:
Kent Ross
2023-07-20 15:53:58 +02:00
committed by GitHub
parent bf0d977cd0
commit 7568327834
+2 -2
View File
@@ -28,7 +28,7 @@ int main(int argc, char **argv) {
}; };
int port = 3000; int port = 3000;
struct us_socket_context_options_t ssl_options = {}; uWS::SocketContextOptions ssl_options = {};
while ((option = optparse_long(&options, longopts, nullptr)) != -1) { while ((option = optparse_long(&options, longopts, nullptr)) != -1) {
switch (option) { switch (option) {
@@ -63,7 +63,7 @@ int main(int argc, char **argv) {
AsyncFileStreamer asyncFileStreamer(root); AsyncFileStreamer asyncFileStreamer(root);
/* Either serve over HTTP or HTTPS */ /* Either serve over HTTP or HTTPS */
struct us_socket_context_options_t empty_ssl_options = {}; uWS::SocketContextOptions empty_ssl_options = {};
if (memcmp(&ssl_options, &empty_ssl_options, sizeof(empty_ssl_options))) { if (memcmp(&ssl_options, &empty_ssl_options, sizeof(empty_ssl_options))) {
/* HTTPS */ /* HTTPS */
uWS::SSLApp(ssl_options).get("/*", [&asyncFileStreamer](auto *res, auto *req) { uWS::SSLApp(ssl_options).get("/*", [&asyncFileStreamer](auto *res, auto *req) {