Project homepage Mailing List  Warmcat.com  API Docs  Github Mirror 
    npro  
 Modern all-safe Rust Network Protocol library supporting h1, h2, h3, ws, wt sans-IO and with socket IO + tls
git clone https://npro.rs/repo/npro
 
root / assets / netbsd-OSX-bigsur.svg.svg
Author[]Andy Green <andy@warmcat.com> 2026-04-05 12:47 UTC
Committer[]Andy Green <andy@warmcat.com> 2026-04-08 08:43 UTC
Tree43b2f07876e9f2a9f1ba2aadb819b64ab5d7ae47   Raw Patch
 
debug-windows-crash
debug-windows-crash
diff --git a/src/builder/b-logproxy.c b/src/builder/b-logproxy.c index 0fb9732..ce73331 100644 --- a/src/builder/b-logproxy.c +++ b/src/builder/b-logproxy.c @@ -1,7 +1,7 @@ /* * sai-builder - logproxy * - * Copyright (C) 2019 - 2020 Andy Green <andy@warmcat.com> + * Copyright (C) 2019 - 2026 Andy Green <andy@warmcat.com> * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -54,8 +54,9 @@ callback_logproxy(struct lws *wsi, enum lws_callback_reasons reason, } const struct lws_protocols protocol_logproxy = { - "protocol-logproxy", - callback_logproxy, - 0, - 2048, 2048, NULL, 0 + .name = "protocol-logproxy", + .callback = callback_logproxy, + .per_session_data_size = 0, + .rx_buffer_size = 2048, + .tx_packet_size = 2048, }; diff --git a/src/builder/b-nspawn.c b/src/builder/b-nspawn.c index b11ab5c..79d2fb0 100644 --- a/src/builder/b-nspawn.c +++ b/src/builder/b-nspawn.c @@ -149,8 +149,12 @@ callback_sai_stdwsi(struct lws *wsi, enum lws_callback_reasons reason, return 0; } -struct lws_protocols protocol_stdxxx = - { "sai-stdxxx", callback_sai_stdwsi, 0, 0 }; +struct lws_protocols protocol_stdxxx = { + .name = "sai-stdxxx", + .callback = callback_sai_stdwsi, + .per_session_data_size = 0, + .rx_buffer_size = 0, +}; /* * We are called when the process completed and has been reaped at diff --git a/src/builder/b-refproxy.c b/src/builder/b-refproxy.c index cd9f37e..b4b6024 100644 --- a/src/builder/b-refproxy.c +++ b/src/builder/b-refproxy.c @@ -237,8 +237,9 @@ callback_resproxy(struct lws *wsi, enum lws_callback_reasons reason, } const struct lws_protocols protocol_resproxy = { - "protocol-resproxy", - callback_resproxy, - sizeof(struct rppss), - 2048, 2048, NULL, 0 + .name = "protocol-resproxy", + .callback = callback_resproxy, + .per_session_data_size = sizeof(struct rppss), + .rx_buffer_size = 2048, + .tx_packet_size = 2048, }; diff --git a/src/builder/b-sai.c b/src/builder/b-sai.c index ac7f12d..954a275 100644 --- a/src/builder/b-sai.c +++ b/src/builder/b-sai.c @@ -598,7 +598,7 @@ saib_app_run(int argc, const char **argv) #endif lwsl_user("Sai Builder - " - "Copyright (C) 2019-2020 Andy Green <andy@warmcat.com>\n"); + "Copyright (C) 2019-2026 Andy Green <andy@warmcat.com>\n"); lwsl_user(" sai-builder [-c <config-file>]\n"); lwsl_notice("%s: sai-power: %s %s %s %s %s\n", @@ -612,13 +612,9 @@ saib_app_run(int argc, const char **argv) info.port = CONTEXT_PORT_NO_LISTEN; info.pprotocols = pprotocols; - info.pprotocols = pprotocols; - info.uid = sb.st_uid; info.gid = sb.st_gid; - - #if !defined(LWS_WITHOUT_EXTENSIONS) if (!lws_cmdline_option(argc, argv, "-n")) info.extensions = extensions; diff --git a/src/builder/b-suspender.c b/src/builder/b-suspender.c index 011c009..81818fe 100644 --- a/src/builder/b-suspender.c +++ b/src/builder/b-suspender.c @@ -122,8 +122,12 @@ callback_sai_suspender_stdwsi(struct lws *wsi, enum lws_callback_reasons reason, return 0; } -struct lws_protocols protocol_suspender_stdxxx = - { "sai-suspender-stdxxx", callback_sai_suspender_stdwsi, 0, 0 }; +struct lws_protocols protocol_suspender_stdxxx = { + .name = "sai-suspender-stdxxx", + .callback = callback_sai_suspender_stdwsi, + .per_session_data_size = 0, + .rx_buffer_size = 0, +}; #if !defined(__APPLE__) && !defined(__NetBSD__) && !defined(__OpenBSD__) && !defined(__FreeBSD__) static void reap(void *opaque, const lws_spawn_resource_us_t *res, diff --git a/src/expect/e-serial.c b/src/expect/e-serial.c index 338f5e1..aa6ffb4 100644 --- a/src/expect/e-serial.c +++ b/src/expect/e-serial.c @@ -242,5 +242,8 @@ callback_serial(struct lws *wsi, enum lws_callback_reasons reason, } struct lws_protocols protocol_serial = { - "sai-serial", callback_serial, sizeof(struct pss), 0, + .name = "sai-serial", + .callback = callback_serial, + .per_session_data_size = sizeof(struct pss), + .rx_buffer_size = 0, }; diff --git a/src/jig/j-server.c b/src/jig/j-server.c index a9c48fe..f879795 100644 --- a/src/jig/j-server.c +++ b/src/jig/j-server.c @@ -215,7 +215,11 @@ fin: return lws_callback_http_dummy(wsi, reason, user, in, len); } -static const struct lws_protocols protocol = - { "http", callback_dynamic_http, sizeof(struct pss), 0 }; +static const struct lws_protocols protocol = { + .name = "jig-server", + .callback = callback_dynamic_http, + .per_session_data_size = sizeof(struct pss), + .rx_buffer_size = 4096, +}; const struct lws_protocols *pprotocols[] = { &protocol, NULL }; diff --git a/src/power/p-sai.c b/src/power/p-sai.c index a3b19af..de7c4a5 100644 --- a/src/power/p-sai.c +++ b/src/power/p-sai.c @@ -179,8 +179,12 @@ callback_std(struct lws *wsi, enum lws_callback_reasons reason, void *user, } -static const struct lws_protocols protocol_std = - { "protocol_std", callback_std, 0, 0 }; +static const struct lws_protocols protocol_std = { + .name = "protocol_std", + .callback = callback_std, + .per_session_data_size = 0, + .rx_buffer_size = 0, +}; static const struct lws_protocols *pprotocols[] = { &protocol_std, diff --git a/src/server/s-comms.c b/src/server/s-comms.c index a7ea272..1603681 100644 --- a/src/server/s-comms.c +++ b/src/server/s-comms.c @@ -537,5 +537,9 @@ passthru: return lws_callback_http_dummy(wsi, reason, user, in, len); } -const struct lws_protocols protocol_ws = - { "com-warmcat-sai", s_callback_ws, sizeof(struct pss), 0 }; +const struct lws_protocols protocol_ws = { + .name = "com-warmcat-sai", + .callback = s_callback_ws, + .per_session_data_size = sizeof(struct pss), + .rx_buffer_size = 0, +}; diff --git a/src/web/w-comms.c b/src/web/w-comms.c index d6fc7a2..84f3ea9 100644 --- a/src/web/w-comms.c +++ b/src/web/w-comms.c @@ -641,5 +641,9 @@ try_to_reuse: return 0; } -const struct lws_protocols protocol_ws = - { "com-warmcat-sai", w_callback_ws, sizeof(struct pss), 0 }; +const struct lws_protocols protocol_ws = { + .name = "com-warmcat-sai", + .callback = w_callback_ws, + .per_session_data_size = sizeof(struct pss), + .rx_buffer_size = 0, +};
Page fetched 0s ago, creation time: 15ms (vhost etag hits: 0%, cache hits: 0%)