aboutsummaryrefslogtreecommitdiff
path: root/c++-libbu++/src/gatscon/clientthread.h
blob: 903028a5e08b434140539197ef38707ae6fd6448 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
/*
 * Copyright (C) 2007-2013 Xagasoft, All rights reserved.
 *
 * This file is part of the libgats library and is released under the
 * terms of the license contained in the file LICENSE.
 */

#ifndef CLIENT_THREAD_H
#define CLIENT_THREAD_H

#include <QThread>
#include <QByteArray>

#include <bu/streamstack.h>
#include <gats/gatsstream.h>

namespace Gats
{
    class Object;
};

class ClientThread : public QThread
{
    Q_OBJECT;
public:
    ClientThread( QObject *pParent, const QByteArray &baHost, int iPort );
    virtual ~ClientThread();

    void send( Gats::Object *pObj );

signals:
    void recv( Gats::Object *pObj );

protected:
    virtual void run();

private:
    QByteArray baHost;
    int iPort;
    Bu::StreamStack ssCli;
    Gats::GatsStream gsCli;
};

#endif