aboutsummaryrefslogtreecommitdiff
path: root/src/gatscon/proxythread.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/gatscon/proxythread.h60
1 files changed, 60 insertions, 0 deletions
diff --git a/src/gatscon/proxythread.h b/src/gatscon/proxythread.h
new file mode 100644
index 0000000..df75046
--- /dev/null
+++ b/src/gatscon/proxythread.h
@@ -0,0 +1,60 @@
1#ifndef PROXY_THREAD_H
2#define PROXY_THREAD_H
3
4#include <QThread>
5
6#include <bu/streamstack.h>
7#include <gats/gatsstream.h>
8
9class ProxyThread : public QThread
10{
11 Q_OBJECT;
12public:
13 ProxyThread( QObject *pParent, int iPortIn, const QByteArray &baHostOut,
14 int iPortOut );
15 virtual ~ProxyThread();
16
17 class ProxyHostThread *pHost;
18
19 void send( Gats::Object *pObj );
20
21signals:
22 void recv( Gats::Object *pObj );
23 void gotConnection();
24
25protected:
26 virtual void run();
27
28private:
29 int iPortIn;
30 QByteArray baHostOut;
31 int iPortOut;
32
33 Bu::StreamStack ssCli;
34 Gats::GatsStream gsCli;
35};
36
37class ProxyHostThread : public QThread
38{
39 Q_OBJECT;
40public:
41 ProxyHostThread( QObject *pParent, ProxyThread *pClient );
42 virtual ~ProxyHostThread();
43
44 void send( Gats::Object *pObj );
45
46 void setStream( Bu::Stream *pStr );
47
48signals:
49 void recv( Gats::Object *pObj );
50
51protected:
52 virtual void run();
53
54private:
55 ProxyThread *pClient;
56 Bu::StreamStack ssHst;
57 Gats::GatsStream gsHst;
58};
59
60#endif