get back tcp port for SCGI server
authorKonrad Rosenbaum <konrad@silmor.de>
Sun, 10 Feb 2013 21:14:19 +0000 (22:14 +0100)
committerKonrad Rosenbaum <konrad@silmor.de>
Sun, 10 Feb 2013 21:14:19 +0000 (22:14 +0100)
qtbase/include/server.h
qtbase/src/server.cpp

index 6921a17..9b375cc 100644 (file)
@@ -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
                 * 
index 81f3162..98403ef 100644 (file)
@@ -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);