Mercurial
diff seobeo/seobeo_internal.h @ 67:6626ec933933
[Seobeo] Separated out Client Server logic. Created test tools.
| author | June Park <parkjune1995@gmail.com> |
|---|---|
| date | Wed, 24 Dec 2025 09:15:55 -0800 |
| parents | a0f0ad5e42eb |
| children | 75de5903355c |
line wrap: on
line diff
--- a/seobeo/seobeo_internal.h Wed Dec 24 06:34:19 2025 -0800 +++ b/seobeo/seobeo_internal.h Wed Dec 24 09:15:55 2025 -0800 @@ -1,9 +1,16 @@ #ifndef SEOBEO_SERVER_INTERNAL_H #define SEOBEO_SERVER_INTERNAL_H -// SSL -#include <openssl/ssl.h> +// SSL - conditionally included +#ifndef SEOBEO_NO_SSL +#include <openssl/ssl.h> #include <openssl/err.h> +#define SSL_CTX_TYPE SSL_CTX +#define SSL_TYPE SSL +#else +#define SSL_CTX_TYPE void +#define SSL_TYPE void +#endif #ifndef DIRECTORY #define DIRECTORY @@ -22,9 +29,9 @@ char *host; char *port; - - SSL_CTX *ssl_ctx; - SSL *ssl; + + SSL_CTX_TYPE *ssl_ctx; + SSL_TYPE *ssl; uint8 *read_buffer; uint32 read_buffer_capacity; @@ -64,6 +71,10 @@ // --- SSL --- // extern void Seobeo_Web_SSL_Init(); extern void Seobeo_Web_SSL_Cleanup(); // Not used +extern int Seobeo_SSL_Setup_Client(Seobeo_Handle *p_handle, const char *host, int socket_fd); +extern void Seobeo_SSL_Cleanup(Seobeo_Handle *p_handle); +extern int32 Seobeo_SSL_Write(Seobeo_Handle *p_handle, const uint8 *data, uint32 length); +extern int32 Seobeo_SSL_Read(Seobeo_Handle *p_handle, uint8 *buffer, uint32 length); // --- Serving using Edge --- // extern void *Seobeo_Web_Edge_Worker(void *vargs); @@ -71,4 +82,3 @@ extern void Seobeo_Web_Edge_2(Seobeo_Handle *p_server_handle, Dowa_HashMap *p_html_cache); #endif -