summaryrefslogtreecommitdiff
path: root/src/websockets/qwebsocketserver.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/websockets/qwebsocketserver.h')
-rw-r--r--src/websockets/qwebsocketserver.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/websockets/qwebsocketserver.h b/src/websockets/qwebsocketserver.h
index 17d5376..ceb9106 100644
--- a/src/websockets/qwebsocketserver.h
+++ b/src/websockets/qwebsocketserver.h
@@ -52,6 +52,10 @@
#include <QtNetwork/QSslError>
#endif
+#if QT_HAS_INCLUDE(<chrono>)
+#include <chrono>
+#endif
+
QT_BEGIN_NAMESPACE
class QTcpSocket;
@@ -86,6 +90,19 @@ public:
void setMaxPendingConnections(int numConnections);
int maxPendingConnections() const;
+#if QT_HAS_INCLUDE(<chrono>) || defined(Q_CLANG_QDOC)
+ void setHandshakeTimeout(std::chrono::milliseconds msec)
+ {
+ setHandshakeTimeout(int(msec.count()));
+ }
+ std::chrono::milliseconds handshakeTimeout() const
+ {
+ return std::chrono::milliseconds(handshakeTimeoutMS());
+ }
+#endif
+ void setHandshakeTimeout(int msec);
+ int handshakeTimeoutMS() const;
+
quint16 serverPort() const;
QHostAddress serverAddress() const;
QUrl serverUrl() const;