Serve HTTPS + WSS requets, listening URL ? #2405
-
Hi, What is the right way to start a listener which can serve HTTPS requests but also when needed can upgrade to WSS ? Should you mg_http_listen() "https://0.0.0.0:8443" or "wss://0.0.0.0:8443" ? Or it does not matter, both are fine ? Regards. |
Beta Was this translation helpful? Give feedback.
Answered by
cpq
Oct 4, 2023
Replies: 1 comment
-
Both are fine. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
cpq
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Both are fine.
The main thing is that on MG_EV_ACCEPT, the code calls mg_tls_init()
Then, upgrade on MG_EV_HTTP_MSG when required - see example