This repository has been archived on 2026-05-31. You can view files and clone it, but cannot push or open issues or pull requests.
Simon Stuerz 59c1157e57 client added, connection over tcp works
to do now: communication protocoll for json
2013-08-22 11:43:38 +02:00

36 lines
553 B
C++

#ifndef SERVER_H
#define SERVER_H
#include <QObject>
#include <QNetworkInterface>
#include <QTcpServer>
#include <QTcpSocket>
class Server : public QObject
{
Q_OBJECT
public:
explicit Server(QObject *parent = 0);
private:
QList<QTcpServer*> m_serverList;
QList<QTcpSocket*> m_clientList;
signals:
private slots:
void newClientConnected();
void readPackage();
void clientDisconnected();
public slots:
bool startServer();
bool stopServer();
void sendToAll(QString data);
};
#endif // SERVER_H