-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathserver.h
More file actions
37 lines (30 loc) · 751 Bytes
/
server.h
File metadata and controls
37 lines (30 loc) · 751 Bytes
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
#ifndef SERVER_H
#define SERVER_H
#include <QStringList>
#include <QTcpServer>
/**
* \class EtaNetServer
*
* \brief The EtaNetServer makes it possible to accept incoming TCP connections.
*
* You can listen on a specific address or on all the machine's addresses.
*/
class EtaNetServer : public QTcpServer
{
Q_OBJECT
public:
/**
* @brief Constructor
*/
EtaNetServer(QObject *parent = 0);
protected:
/**
* @brief This virtual function is called by server when a new connection is available.
* @param socket descriptor - is the native socket descriptor for the accepted connection
*
*/
void incomingConnection(qintptr socketDescriptor) override;
private:
QStringList fortunes;
};
#endif