forward protobuf messages.

configure (send proto messages to two other hyperiond):

"protoServer" :
{
	"port"    : 19446,
	"forward" : [ "192.168.0.10:19445", "192.168.0.11:19445" ]
},


Former-commit-id: 33af219cfce99609ca7245d662dc0f0561013bbd
This commit is contained in:
redpanther
2016-02-08 16:56:23 +01:00
parent cf34f45daa
commit 5dc59344c4
6 changed files with 48 additions and 10 deletions

View File

@@ -67,10 +67,6 @@ public:
///
void clearAll();
private:
/// Try to connect to the Hyperion host
void connectToHost();
///
/// Send a command message and receive its reply
///
@@ -78,6 +74,10 @@ private:
///
void sendMessage(const proto::HyperionRequest & message);
private:
/// Try to connect to the Hyperion host
void connectToHost();
///
/// Parse a reply message
///

View File

@@ -6,6 +6,7 @@
// Qt includes
#include <QTcpServer>
#include <QSet>
#include <QStringList>
// Hyperion includes
#include <hyperion/Hyperion.h>
@@ -27,7 +28,7 @@ public:
/// @param hyperion Hyperion instance
/// @param port port number on which to start listening for connections
///
ProtoServer(Hyperion * hyperion, uint16_t port = 19445);
ProtoServer(Hyperion * hyperion, uint16_t port = 19445, QStringList * forwardClientList = new QStringList() );
~ProtoServer();
///
@@ -56,4 +57,5 @@ private:
/// List with open connections
QSet<ProtoClientConnection *> _openConnections;
QStringList _forwardClients;
};