CCIMXDesktop
Loading...
Searching...
No Matches
Pinger.h
1
#ifndef PINGER_H
2
#define PINGER_H
3
#include <QHostAddress>
4
#include <QWidget>
5
class
QTcpSocket;
6
class
QElapsedTimer;
7
class
QHostInfo;
8
namespace
Ui {
9
class
Pinger
;
10
}
11
17
class
Pinger
:
public
QWidget {
18
Q_OBJECT
22
static
constexpr
const
unsigned
int
IS_TIMEOUT = 1000;
26
static
constexpr
const
unsigned
int
PING_FREQ_PERIOD = IS_TIMEOUT;
27
28
public
:
33
explicit
Pinger
(QWidget* parent =
nullptr
);
34
~Pinger
();
35
private
slots:
36
void
resolveHost();
37
void
on_connected();
38
void
on_connectionTimeout();
39
40
private
:
41
Ui::Pinger* ui;
42
QTcpSocket* socket;
43
QElapsedTimer* elapsed_timer;
44
QTimer* pingTimer;
45
QTimer* timeoutTimer;
46
QHostAddress targetAddress;
47
bool
do_ping {
false
};
48
void
setup_memory();
49
void
performPing();
50
void
abortPing();
51
void
onHostResolved(
const
QHostInfo& host);
52
};
53
54
#endif
// PINGER_H
Pinger
The Pinger class holds the ping sessions, now it owns the display issue and processing issues at one ...
Definition
Pinger.h:17
extern_app
NetHelper
ui
Pinger.h
Generated by
1.9.8