diff options
author | Simon Rettberg | 2016-10-28 16:14:07 +0200 |
---|---|---|
committer | Simon Rettberg | 2016-10-28 16:14:07 +0200 |
commit | 6decac6613fef21869784df0d83a0b7c7d1c2008 (patch) | |
tree | fa453e3262039851cf79809569a6446e91cfb595 /src/client/net/serverconnection.h | |
parent | [client] Fix memleak (diff) | |
download | pvs2-6decac6613fef21869784df0d83a0b7c7d1c2008.tar.gz pvs2-6decac6613fef21869784df0d83a0b7c7d1c2008.tar.xz pvs2-6decac6613fef21869784df0d83a0b7c7d1c2008.zip |
[client] Allow ESC key to cancel projection in hybrid mode
Diffstat (limited to 'src/client/net/serverconnection.h')
-rw-r--r-- | src/client/net/serverconnection.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/client/net/serverconnection.h b/src/client/net/serverconnection.h index c36b238..17fa20a 100644 --- a/src/client/net/serverconnection.h +++ b/src/client/net/serverconnection.h @@ -18,6 +18,7 @@ private: int _jpegQuality; int _authed; bool _autoConnect; + int _isLocalConnection; qint64 _lastData; NetworkMessage _fromServer, _toServer; @@ -29,6 +30,8 @@ private: void handleMsg(); + void checkLocalConnection(); + public: ServerConnection(const QString& host, const quint16 port, const QByteArray& sessionName, const QByteArray& certHash, bool autoConnect); void disconnectFromServer(); @@ -42,6 +45,14 @@ public: { return _socket->peerAddress().toString(); } + + bool isLocalConnection() { + if (_isLocalConnection == -1) { + checkLocalConnection(); + } + return _isLocalConnection == 1; + } + void sendMessage(NetworkMessage& message); void sendAttention(bool on); |