MCPcopy Create free account
hub / github.com/OpenStarbound/OpenStarbound / addClient

Method addClient

source/game/StarUniverseServer.cpp:116–123  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

114}
115
116void 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
125UniverseConnection UniverseServer::addLocalClient() {
126 auto pair = LocalPacketSocket::openPair();

Callers 3

warpPlayersMethod · 0.45
arriveShipsMethod · 0.45
acceptConnectionMethod · 0.45

Calls 1

appendMethod · 0.45

Tested by

no test coverage detected