-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmsgserver.h
More file actions
42 lines (25 loc) · 712 Bytes
/
msgserver.h
File metadata and controls
42 lines (25 loc) · 712 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
38
39
40
41
42
#ifndef SCDMSGSERVER_H
#define SCDMSGSERVER_H
#include <QTcpServer>
#include <msgcenter.h>
class SCDMsgServer : public QTcpServer
{
Q_OBJECT
private:
SCDMsgCenter *mc;
int Port;
int Status=0;
public:
explicit SCDMsgServer(int port = 33331, bool verbose=true, QString logFile="msgserver.log", SCDMsgCenter *msgCnt = 0, QObject *parent = 0);
bool start(); // Start tcp server for incoming connections
void stop();
bool status() {return Status;}
bool Verbose;
QString LogErrorFile;
SCDMsgCenter *messageCenter() {return mc;}
signals:
public slots:
protected:
void incomingConnection(qintptr SocketDescriptor);
};
#endif // SCDMSGSERVER_H