Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can you add a https file server example? #35

Open
ClemsonCoder opened this issue Dec 10, 2018 · 2 comments
Open

Can you add a https file server example? #35

ClemsonCoder opened this issue Dec 10, 2018 · 2 comments

Comments

@ClemsonCoder
Copy link

ClemsonCoder commented Dec 10, 2018

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

@wolkykim
Copy link
Owner

wolkykim commented Dec 10, 2018 via email

@manjunathkokhle
Copy link

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..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants