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

Method disconnectSocket

app/src/API/Server.cpp:262–270  ·  view source on GitHub ↗

* @brief Disconnects a socket (worker thread) */

Source from the content-addressed store, hash-verified

260 * @brief Disconnects a socket (worker thread)
261 */
262void API::ServerWorker::disconnectSocket(QTcpSocket* socket)
263{
264 Q_ASSERT(socket);
265
266 if (socket && m_sockets.contains(socket)) {
267 socket->flush();
268 socket->disconnectFromHost();
269 }
270}
271
272/**
273 * @brief Handles socket disconnection (worker thread)

Callers

nothing calls this directly

Calls 2

containsMethod · 0.45
flushMethod · 0.45

Tested by

no test coverage detected