MCPcopy Create free account
hub / github.com/awawa-dev/HyperHDR / forwardJsonMessage

Method forwardJsonMessage

sources/base/NetworkForwarder.cpp:249–265  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

247}
248
249void NetworkForwarder::forwardJsonMessage(const QJsonObject& message)
250{
251 if (_forwarderEnabled)
252 {
253 QTcpSocket client;
254 for (int i = 0; i < _jsonSlaves.size(); i++)
255 {
256 QStringList parts = _jsonSlaves.at(i).split(":");
257 client.connectToHost(QHostAddress(parts[0]), parts[1].toUShort());
258 if (client.waitForConnected(500))
259 {
260 sendJsonMessage(message, &client);
261 client.close();
262 }
263 }
264 }
265}
266
267void NetworkForwarder::signalColorIsSetHandler(ColorRgb color, int duration)
268{

Callers

nothing calls this directly

Calls 3

connectToHostMethod · 0.80
sizeMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected