Commit 6e4be31d authored by jan.koester's avatar jan.koester
Browse files

test

parent cea0ecd7
Loading
Loading
Loading
Loading
+9 −3
Changes for src/httpd.cpp: 9 added lines, 3 removed lines.
Original line number Diff line number Diff line
@@ -46,8 +46,14 @@ libhttppp::HttpEvent::HttpEvent(netplus::socket &ssock, int timeout) : event(&ss

}

struct nop
{
    template <typename T>
    void operator() (T const &) const noexcept { }
};

void libhttppp::HttpEvent::CreateConnection(std::unique_ptr<netplus::con> &res){
    res=std::make_unique<libhttppp::HttpRequest>(this);
    res=std::unique_ptr<libhttppp::HttpRequest>(new HttpRequest(this));
}

void libhttppp::HttpEvent::RequestEvent(HttpRequest &curreq,const int tid,ULONG_PTR args){
@@ -221,13 +227,13 @@ libhttppp::HttpD::HttpD(int argc, char** argv) {
    }
}

libhttppp::HttpD::HttpD(const std::string& httpaddr, int port,int maxconnections,const char *sslcertpath,const char *sslkeypath) {
libhttppp::HttpD::HttpD(const std::string& httpaddr, int port,int maxconnections,const  std::string &sslcertpath,const  std::string &sslkeypath) {
    try {
		_ServerSocket = nullptr;

		_fileServer = false;

        if (sslcertpath && sslkeypath) {
        if (!sslcertpath.empty() && !sslkeypath.empty()) {

            std::vector<char> cert,key;

+2 −2
Changes for src/httpd.h: 2 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -40,7 +40,7 @@ namespace cmdplus {
namespace libhttppp {
    class HttpEvent : public netplus::event {
    public:
        HttpEvent(netplus::socket &ssock,int timeout = 10000);
        HttpEvent(netplus::socket &ssock,int timeout = 1000);

        virtual void RequestEvent(HttpRequest &curreq,const int tid,ULONG_PTR args);
        virtual void ResponseEvent(HttpRequest &curreq,const int tid,ULONG_PTR args);
@@ -60,7 +60,7 @@ namespace libhttppp {
    class HttpD {
    public:
        HttpD(int argc, char** argv);
        HttpD(const std::string &httpaddr, int port, int maxconnections, const char* sslcertpath, const char* sslkeypath);
        HttpD(const std::string &httpaddr, int port, int maxconnections, const std::string &sslcertpath, const  std::string &sslkeypath);
        ~HttpD();
        netplus::socket &getServerSocket();
    protected: