diff options
author | Aaron Seigo <aseigo@kde.org> | 2014-11-21 13:14:20 +0100 |
---|---|---|
committer | Aaron Seigo <aseigo@kde.org> | 2014-11-21 13:14:20 +0100 |
commit | c52b181c3382a754b10f0457763e0364463592ad (patch) | |
tree | 63137816f7c9736a52df4480f46f4d31df47d3e3 /resource/listener.h | |
parent | ed20c3082d4fd5e90703e4d6c37093dcecb5cfd1 (diff) | |
download | sink-c52b181c3382a754b10f0457763e0364463592ad.tar.gz sink-c52b181c3382a754b10f0457763e0364463592ad.zip |
close if we don't get a connection in the first two seconds
Diffstat (limited to 'resource/listener.h')
-rw-r--r-- | resource/listener.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/resource/listener.h b/resource/listener.h index 79c7ba5..2fbd75c 100644 --- a/resource/listener.h +++ b/resource/listener.h | |||
@@ -20,16 +20,22 @@ public: | |||
20 | 20 | ||
21 | class Listener : public QObject | 21 | class Listener : public QObject |
22 | { | 22 | { |
23 | Q_OBJECT | ||
24 | |||
23 | public: | 25 | public: |
24 | Listener(const QString &resourceName, QObject *parent = 0); | 26 | Listener(const QString &resourceName, QObject *parent = 0); |
25 | ~Listener(); | 27 | ~Listener(); |
26 | 28 | ||
29 | Q_SIGNALS: | ||
30 | void noClients(); | ||
31 | |||
27 | public Q_SLOTS: | 32 | public Q_SLOTS: |
28 | void closeAllConnections(); | 33 | void closeAllConnections(); |
29 | 34 | ||
30 | private Q_SLOTS: | 35 | private Q_SLOTS: |
31 | void acceptConnection(); | 36 | void acceptConnection(); |
32 | void clientDropped(); | 37 | void clientDropped(); |
38 | void checkConnections(); | ||
33 | 39 | ||
34 | private: | 40 | private: |
35 | QLocalServer *m_server; | 41 | QLocalServer *m_server; |