Function addListener
Synopsis
#include <lib/inc/drogon/HttpAppFramework.h>
virtual HttpAppFramework & addListener(const std::string &ip, uint16_t port, bool useSSL=false, const std::string &certFile="", const std::string &keyFile="", bool useOldTLS=false, const std::vector< std::pair< std::string, std::string >> &sslConfCmds={})=0
Description
Add a listener for http or https service.
- Parameters
ip
- is the ip that the listener listens on.port
- is the port that the listener listens on.useSSL
- if the parameter is true, the listener is used for the https service.certFile
-keyFile
- specify the cert file and the private key file for this listener. If they are empty, the global configuration set by the above method is used.useOldTLS
- If true, the TLS1.0/1.1 are enabled for HTTPS connections.- Note
- This operation can be performed by an option in the configuration file.
Mentioned in
- Getting Started / A very simple example
- Quick Start / Static Site
- FAQ / Understanding drogon's threading model / Event loops and threads
Source
Line 704 in lib/inc/drogon/HttpAppFramework.h.