| 261 | } |
| 262 | |
| 263 | void Server::newHttpClient() |
| 264 | { |
| 265 | auto* socket = http->nextPendingConnection(); |
| 266 | connect(socket, &QTcpSocket::readyRead, this, &Server::handleHttpRequest); |
| 267 | connect(socket, &QTcpSocket::stateChanged, this, [=] (QAbstractSocket::SocketState s) { |
| 268 | if (s == QAbstractSocket::UnconnectedState) { |
| 269 | socket->deleteLater(); |
| 270 | } |
| 271 | }); |
| 272 | } |
| 273 | |
| 274 | void Server::handleHttpRequest() |
| 275 | { |
nothing calls this directly
no outgoing calls
no test coverage detected