Support DNS resolving via libc-ares

This commit is contained in:
Vitaliy Filippov
2026-04-17 13:53:40 +03:00
parent a8e19ba28a
commit d3c529abd7
18 changed files with 134 additions and 42 deletions
+2 -2
View File
@@ -114,7 +114,7 @@ struct cli_serve_t
std::string ssl_key = options["ssl_key"].string_value();
std::string ssl_ca = options["ssl_ca"].string_value();
std::string error;
http_ctx = http_context_init(ssl_cert, ssl_key, ssl_ca, ssl_ca != "", error);
http_ctx = http_context_init(parent->epmgr->tfd, ssl_cert, ssl_key, ssl_ca, ssl_ca != "", error);
if (error != "")
{
result = (cli_result_t){ .err = EINVAL, .text = error };
@@ -176,7 +176,7 @@ struct cli_serve_t
cli_serve_conn_t *conn = new cli_serve_conn_t;
conn->peer_fd = peer_fd;
conn->peer_addr = peer_addr_str;
conn->co = http_init(parent->epmgr->tfd, http_ctx);
conn->co = http_init(http_ctx);
http_serve(conn->co, peer_fd, (http_options_t){ .ssl = ssl }, [this, conn](http_message_t *msg)
{
process_request(conn, msg);