added skeleton for the json connection server

This commit is contained in:
johan
2013-08-17 15:39:29 +02:00
parent 2c97353a11
commit 16c260b3dc
9 changed files with 269 additions and 17 deletions

View File

@@ -0,0 +1,36 @@
#pragma once
// system includes
#include <cstdint>
// Qt includes
#include <QTcpServer>
#include <QSet>
// Hyperion includes
#include <hyperion/Hyperion.h>
class JsonClientConnection;
class JsonServer : public QObject
{
Q_OBJECT
public:
JsonServer(Hyperion * hyperion, uint16_t port = 19444);
~JsonServer();
uint16_t getPort() const;
private slots:
void newConnection();
void closedConnection(JsonClientConnection * connection);
private:
Hyperion * _hyperion;
QTcpServer _server;
QSet<JsonClientConnection *> _openConnections;
};