Https server with cpp-netlib

Viewed 5867

How can one use cpp-netlib to implement a HTTPS-server?

The following questions stop me from combining asio SSL and cpp-netlib:

  • Both SSL via asio and cpp-netlib use an asio acceptor that listens to a port (e.g. 80 or 443) and then a separate session for the actual connection.

    I assume that for HTTPS:

    1. You use the asio ssl acceptor
    2. Which instantiates a connection
    3. Then perform the SSL handshake over this connection, and finally
    4. Have cpp-netlib serve HTTP over this connection

    But how can I separate cpp-netlib's HTTP connection handler from the acceptor is uses?

  • Or does one pass a io_service from the asio SSL connection? If so, which one? Or are they all the same?

  • Or is there a completely different route to take?

2 Answers
Related