source: flair-src/trunk/tools/FlairGCS/src/UdtSocket.h@ 243

Last change on this file since 243 was 234, checked in by Sanahuja Guillaume, 6 years ago

create file oscket only when necessary

File size: 1.1 KB
RevLine 
[10]1// %flair:license{
[15]2// This file is part of the Flair framework distributed under the
3// CECILL-C License, Version 1.0.
[10]4// %flair:license}
[9]5#ifndef UDTSOCKET_H
6#define UDTSOCKET_H
7
8#include <udt.h>
9#include <QObject>
10#include <QTimer>
11
12class file_ui;
13
[15]14class UdtSocket : public QObject {
15 Q_OBJECT
[9]16
[15]17public:
[234]18 UdtSocket(UDTSOCKET socket,QString name);
[15]19 ~UdtSocket();
[234]20 void setName(QString name);
21 QString getUDTStats();
[9]22
[15]23private:
[234]24 UDTSOCKET socket;
25 bool stop,destroySocket;
26 QTimer *heartbeat_timer,*udtstats_timer;
[15]27 QString name;
[234]28 static int uncompressBuffer(char *in, ssize_t in_size, char *out,ssize_t *out_size);
29 enum SocketType { unknown, gui, log };
30 SocketType socketType;
31 unsigned int total_received;
32 QString stats;
[9]33
[15]34signals:
35 void dataReady(char *, int size);
[234]36 void newFileUI(UDTSOCKET socket);
37 void newConnectionLayout(QString name);
38 void UDTStats(QString stats);
[9]39
[15]40public slots:
[234]41 void receiveData(void);
[15]42 void kill(void);
[234]43 qint64 write(const char *buf, qint64 size,int ttl=-1,bool inOrder=true);
44
[15]45private slots:
46 void heartbeat(void);
[234]47 void getUTDStats(void);
[9]48};
49
50#endif // UDTSOCKET_H
Note: See TracBrowser for help on using the repository browser.