summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/server.h13
-rw-r--r--include/tls.h2
2 files changed, 8 insertions, 7 deletions
diff --git a/include/server.h b/include/server.h
index db68e33..5795426 100644
--- a/include/server.h
+++ b/include/server.h
@@ -10,9 +10,11 @@
struct gmnisrv_server;
-enum response_state {
- RESPOND_HEADER,
- RESPOND_BODY,
+enum client_state {
+ CLIENT_STATE_REQUEST,
+ CLIENT_STATE_SSL,
+ CLIENT_STATE_HEADER,
+ CLIENT_STATE_BODY,
};
struct gmnisrv_client {
@@ -24,13 +26,12 @@ struct gmnisrv_client {
struct pollfd *pollfd;
SSL *ssl;
- BIO *bio, *sbio;
+ BIO *rbio, *wbio;
char buf[4096];
- static_assert(GEMINI_MAX_URL + 3 < 4096, "GEMINI_MAX_URL is too high");
size_t bufix, bufln;
- enum response_state state;
+ enum client_state state, next;
enum gemini_status status;
char *meta;
FILE *body;
diff --git a/include/tls.h b/include/tls.h
index 81ff613..0882ff0 100644
--- a/include/tls.h
+++ b/include/tls.h
@@ -5,7 +5,7 @@ struct gmnisrv_config;
int tls_init(struct gmnisrv_config *conf);
void tls_finish(struct gmnisrv_config *conf);
-SSL *tls_get_ssl(struct gmnisrv_config *conf, int fd);
+SSL *tls_get_ssl(struct gmnisrv_config *conf);
void tls_set_host(SSL *ssl, struct gmnisrv_host *host);
#endif