From: Konrad Rosenbaum Date: Sun, 10 Feb 2013 21:14:19 +0000 (+0100) Subject: get back tcp port for SCGI server X-Git-Url: http://git.silmor.de/gitweb/?a=commitdiff_plain;h=890c40115fcf95e804e066cc17b205fc9fcf5b32;p=web%2Fkonrad%2Fpack.git get back tcp port for SCGI server --- diff --git a/qtbase/include/server.h b/qtbase/include/server.h index 6921a17..9b375cc 100644 --- a/qtbase/include/server.h +++ b/qtbase/include/server.h @@ -126,6 +126,9 @@ class WOLF_BASE_EXPORT WServer:public QObject ///this is the time that a request has to be completely received int receiveTimeout()const{return mrecvtimeout;} + ///returns the TCP port if it runs on TCP + quint16 tcpPort()const; + public slots: /** registers an interface to handle a specific path * diff --git a/qtbase/src/server.cpp b/qtbase/src/server.cpp index 81f3162..98403ef 100644 --- a/qtbase/src/server.cpp +++ b/qtbase/src/server.cpp @@ -62,6 +62,12 @@ WServer::WServer(const QHostAddress&host,unsigned short port,QObject*parent) void WServer::enableDebugUrl(bool enable){mdebugenabled=enable;} +quint16 WServer::tcpPort()const +{ + if(tcpserv==nullptr)return 0; + return tcpserv->serverPort(); +} + static inline QString normalizepath(const QString &p) { QStringList src=QString(p).replace("\\","/").split("/",QString::SkipEmptyParts);