Last change
on this file since 408 was 399, checked in by Sanahuja Guillaume, 4 years ago |
change color of status bar in gcs if high bandwidth usage is detected
|
File size:
1.2 KB
|
Rev | Line | |
---|
[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 |
|
---|
| 12 | class file_ui;
|
---|
| 13 |
|
---|
[15] | 14 | class UdtSocket : public QObject {
|
---|
| 15 | Q_OBJECT
|
---|
[9] | 16 |
|
---|
[15] | 17 | public:
|
---|
[234] | 18 | UdtSocket(UDTSOCKET socket,QString name);
|
---|
[15] | 19 | ~UdtSocket();
|
---|
[234] | 20 | void setName(QString name);
|
---|
| 21 | QString getUDTStats();
|
---|
[9] | 22 |
|
---|
[15] | 23 | private:
|
---|
[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;
|
---|
[399] | 33 | unsigned int pktSndLossTotal;
|
---|
| 34 | unsigned int lastpktRecvTotal;
|
---|
| 35 |
|
---|
[9] | 36 |
|
---|
[15] | 37 | signals:
|
---|
| 38 | void dataReady(char *, int size);
|
---|
[234] | 39 | void newFileUI(UDTSOCKET socket);
|
---|
| 40 | void newConnectionLayout(QString name);
|
---|
[399] | 41 | void UDTStats(QString stats,QString stylesheet,bool loosingPackets);
|
---|
[9] | 42 |
|
---|
[15] | 43 | public slots:
|
---|
[234] | 44 | void receiveData(void);
|
---|
[15] | 45 | void kill(void);
|
---|
[234] | 46 | qint64 write(const char *buf, qint64 size,int ttl=-1,bool inOrder=true);
|
---|
| 47 |
|
---|
[15] | 48 | private slots:
|
---|
| 49 | void heartbeat(void);
|
---|
[234] | 50 | void getUTDStats(void);
|
---|
[9] | 51 | };
|
---|
| 52 |
|
---|
| 53 | #endif // UDTSOCKET_H
|
---|
Note:
See
TracBrowser
for help on using the repository browser.