From 890c40115fcf95e804e066cc17b205fc9fcf5b32 Mon Sep 17 00:00:00 2001 From: Konrad Rosenbaum Date: Sun, 10 Feb 2013 22:14:19 +0100 Subject: [PATCH] get back tcp port for SCGI server --- qtbase/include/server.h | 3 +++ qtbase/src/server.cpp | 6 ++++++ 2 files changed, 9 insertions(+), 0 deletions(-) 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); -- 1.7.2.5