From db2611fcad18f73572dd1b344e4197536086be53 Mon Sep 17 00:00:00 2001 From: ame Date: Sun, 15 Feb 2026 04:08:16 -0600 Subject: ssl server support, websocket upgrades, and net changes --- src/net/common.h | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'src/net/common.h') diff --git a/src/net/common.h b/src/net/common.h index 6bb161c..6d2f625 100644 --- a/src/net/common.h +++ b/src/net/common.h @@ -17,6 +17,7 @@ #include "../types/str.h" #include "../types/parray.h" #include "../types/map.h" +#include "ssl.h" #define max_con 200 //2^42 @@ -35,8 +36,16 @@ struct file_parse { int dash_count, table_idx; }; +struct net_data { + SSL* ssl; + SSL_CTX* ctx; + int sock; + str* buffer; +}; + typedef struct { - int fd, ser; + struct net_data* ctx; + int ser; int port; lua_State* L; struct sockaddr_in cli; @@ -51,6 +60,9 @@ struct lchar { struct net_server_state { int event_fd; + int ssl; + str* ssl_key; + str* ssl_crt; }; struct sarray_t { -- cgit v1.2.3