mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
make protoconnection to invalid host less blocking
Former-commit-id: e7a89c87b15fbe9809ec63468b59ecc55c6d3e72
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
#include <QColor>
|
||||
#include <QImage>
|
||||
#include <QTcpSocket>
|
||||
#include <QTimer>
|
||||
#include <QMap>
|
||||
|
||||
// hyperion util
|
||||
@@ -19,8 +20,11 @@
|
||||
///
|
||||
/// Connection class to setup an connection to the hyperion server and execute commands
|
||||
///
|
||||
class ProtoConnection
|
||||
class ProtoConnection : public QObject
|
||||
{
|
||||
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
///
|
||||
/// Constructor
|
||||
@@ -74,10 +78,13 @@ public:
|
||||
///
|
||||
void sendMessage(const proto::HyperionRequest & message);
|
||||
|
||||
private:
|
||||
private slots:
|
||||
/// Try to connect to the Hyperion host
|
||||
void connectToHost();
|
||||
|
||||
|
||||
private:
|
||||
|
||||
///
|
||||
/// Parse a reply message
|
||||
///
|
||||
@@ -99,4 +106,7 @@ private:
|
||||
|
||||
/// Skip receiving reply messages from Hyperion if set
|
||||
bool _skipReply;
|
||||
|
||||
QTimer _timer;
|
||||
QAbstractSocket::SocketState _prevSocketState;
|
||||
};
|
||||
|
Reference in New Issue
Block a user