wolkykim / libasyncd

Libasyncd is an embeddable event-based asynchronous Message/HTTP server framework for C/C++.

Home Page:http://wolkykim.github.io/libasyncd/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Can you add a https file server example?

ClemsonCoder opened this issue · comments

Hey.

I've been looking for a c/c++ library that can be used to make a https web server.

How do I combine the SSL and http server examples so that I can make an https server?

Best,

Rick

ad_server_t *server_tls = ad_server_new ();
ad_server_set_option (server_tls, "server.port", port);
ad_server_set_option (server_tls, "server.addr", IP);
// ad_server_set_option (server_tls, "server.thread", "1"); if needed as separate thread
ad_server_set_ssl_ctx(server_tls, ad_server_ssl_ctx_create_simple(cert file .pem , key file .pem );
ad_server_register_hook(server_tls, ad_http_handler, NULL);
ad_server_start(server_tls);

this shd do the job..