MCPcopy Create free account
hub / github.com/codestation/qcma / sendMessage

Method sendMessage

cli/singlecoreapplication.cpp:51–69  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

49}
50
51bool SingleCoreApplication::sendMessage(const QString &message)
52{
53 QLocalSocket socket;
54 socket.connectToServer(SHARED_KEY, QIODevice::WriteOnly);
55
56 if(!socket.waitForConnected(timeout)) {
57 return false;
58 }
59
60 socket.write(message.toUtf8());
61
62 if(!socket.waitForBytesWritten(timeout)) {
63 qDebug() << socket.errorString();
64 return false;
65 }
66
67 socket.disconnectFromServer();
68 return true;
69}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected