MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / writeToSocket

Method writeToSocket

app/src/API/Server.cpp:250–257  ·  view source on GitHub ↗

* @brief Writes data to a specific socket (worker thread) */

Source from the content-addressed store, hash-verified

248 * @brief Writes data to a specific socket (worker thread)
249 */
250void API::ServerWorker::writeToSocket(QTcpSocket* socket, const QByteArray& data)
251{
252 Q_ASSERT(socket);
253 Q_ASSERT(!data.isEmpty());
254
255 if (socket && m_sockets.contains(socket) && socket->isWritable())
256 socket->write(data);
257}
258
259/**
260 * @brief Disconnects a socket (worker thread)

Callers

nothing calls this directly

Calls 4

isEmptyMethod · 0.80
containsMethod · 0.45
isWritableMethod · 0.45
writeMethod · 0.45

Tested by

no test coverage detected