include QtNetwork include QTcpSocket include QObject include QByteArra

 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
#include <QtNetwork>
#include <QTcpSocket>
#include <QObject>
#include <QByteArray>
#include <QDebug>
#include <QList>
class QTcpServer;
class Network : public QObject {
Q_OBJECT
public:
Network(unsigned int);
~Network();
private slots:
void newUser();
void readUserData();
void disconnectedClient();
private:
QTcpServer *_server;
QList<QTcpSocket *> *_socket;
};