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.h16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/websockets/qwebsocketserver.h b/src/websockets/qwebsocketserver.h
index dd06448..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,8 +90,18 @@ 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 handshakeTimeout() const;
+ int handshakeTimeoutMS() const;
quint16 serverPort() const;
QHostAddress serverAddress() const;