| 114 | } |
| 115 | |
| 116 | void UniverseServer::addClient(UniverseConnection remoteConnection) { |
| 117 | RecursiveMutexLocker acceptThreadsLocker(m_connectionAcceptThreadsMutex); |
| 118 | // Binding requires us to make the given lambda copy constructible, so the |
| 119 | // make_shared is requried here. |
| 120 | m_connectionAcceptThreads.append(Thread::invoke("UniverseServer::acceptConnection", [this, conn = make_shared<UniverseConnection>(std::move(remoteConnection))]() { |
| 121 | acceptConnection(std::move(*conn), {}); |
| 122 | })); |
| 123 | } |
| 124 | |
| 125 | UniverseConnection UniverseServer::addLocalClient() { |
| 126 | auto pair = LocalPacketSocket::openPair(); |
no test coverage detected