| 25 | namespace dpp { |
| 26 | |
| 27 | http_server::http_server(cluster* owner, const std::string_view address, uint16_t port, http_server_request_event handle_request, const std::string& private_key, const std::string& public_key) |
| 28 | : socket_listener<http_server_request>(owner, address, port, private_key.empty() ? li_plaintext : li_ssl, private_key, public_key), request_handler(handle_request), bound_port(port) |
| 29 | { |
| 30 | } |
| 31 | |
| 32 | void http_server::emplace(socket newfd) { |
| 33 | connections.emplace(newfd, std::make_unique<http_server_request>(creator, newfd, bound_port, plaintext, private_key_file, public_key_file, request_handler)); |