Function addListener


#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="")=0


Add a listener for http or https service.


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.

This operation can be performed by an option in the configuration file.

Mentioned in


Line 656 in lib/inc/drogon/HttpAppFramework.h.

Add Discussion as Guest

Log in