diff options
author | Manuel Schneider | 2014-11-28 14:54:54 +0100 |
---|---|---|
committer | Manuel Schneider | 2014-11-28 14:54:54 +0100 |
commit | 303dfd7c1798f4aa211653d1bc66a9998cbe6ceb (patch) | |
tree | c3c105a29bdac1ade88a06e7ae264028dbab1150 /src/client/net/serverdiscovery.h | |
parent | Remove redundant flags (diff) | |
download | pvs2-303dfd7c1798f4aa211653d1bc66a9998cbe6ceb.tar.gz pvs2-303dfd7c1798f4aa211653d1bc66a9998cbe6ceb.tar.xz pvs2-303dfd7c1798f4aa211653d1bc66a9998cbe6ceb.zip |
Reset debug timeouts, fix autoconnect, remove magic numbers
Diffstat (limited to 'src/client/net/serverdiscovery.h')
-rw-r--r-- | src/client/net/serverdiscovery.h | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/client/net/serverdiscovery.h b/src/client/net/serverdiscovery.h index fee9fd0..a41c946 100644 --- a/src/client/net/serverdiscovery.h +++ b/src/client/net/serverdiscovery.h @@ -24,9 +24,11 @@ class ServerDiscovery : public QObject inline bool isActive(){ return _discoveryTimer.isActive(); } private: - QTimer _discoveryTimer; - int _hashErrorCount; - int _ipErrorCount; + QTimer _discoveryTimer; + const int _minDiscoveryInterval; + const int _maxDiscoveryInterval; + int _hashErrorCount; + int _ipErrorCount; QByteArray _nameBytes; QByteArray _salt2; QUdpSocket _discoverySocket; @@ -37,9 +39,8 @@ class ServerDiscovery : public QObject static const int UDPBUFSIZ = 9000; static const int SALT_LEN = 18; -public: signals: - void serverDetected(const QString& host, const quint16 port, const QByteArray& sessionName, const QByteArray& certHash); + void serverDetected(const QString& host, const quint16 port, const QByteArray& sessionName, const QByteArray& certHash, bool autoConnect); void error(ErrorType e, int count); public slots: |