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

Method run

source/server/StarServerRconThread.cpp:45–60  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

43}
44
45void ServerRconThread::run() {
46 try {
47 auto timeout = Root::singleton().configuration()->get("rconServerTimeout").toInt();
48 while (!m_stop) {
49 if (auto client = m_rconServer.accept(100)) {
50 client->setTimeout(timeout);
51 auto rconClient = make_shared<ServerRconClient>(m_universe, client);
52 rconClient->start();
53 m_clients[client->remoteAddress().address()] = rconClient;
54 clearClients();
55 }
56 }
57 } catch (std::exception const& e) {
58 Logger::error("ServerRconThread exception caught: {}", e.what());
59 }
60}
61
62}

Callers

nothing calls this directly

Calls 11

singletonClass · 0.85
errorFunction · 0.85
toIntMethod · 0.80
configurationMethod · 0.80
setTimeoutMethod · 0.80
addressMethod · 0.80
remoteAddressMethod · 0.80
getMethod · 0.45
acceptMethod · 0.45
startMethod · 0.45
whatMethod · 0.45

Tested by

no test coverage detected