* @brief Writes data to a specific socket (worker thread) */
| 248 | * @brief Writes data to a specific socket (worker thread) |
| 249 | */ |
| 250 | void 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) |
nothing calls this directly
no test coverage detected