MCPcopy Create free account
hub / github.com/OpenRCT2/OpenRCT2 / AddClient

Method AddClient

src/openrct2/network/NetworkBase.cpp:2105–2117  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2103 }
2104
2105 void NetworkBase::AddClient(std::unique_ptr<ITcpSocket>&& socket)
2106 {
2107 // Log connection info.
2108 char addr[128];
2109 snprintf(addr, sizeof(addr), "Client joined from %s", socket->GetHostName());
2110 AppendServerLog(addr);
2111
2112 // Store connection
2113 auto connection = std::make_unique<Connection>();
2114 connection->socket = std::move(socket);
2115
2116 client_connection_list.push_back(std::move(connection));
2117 }
2118
2119 void NetworkBase::ServerClientDisconnected(std::unique_ptr<Connection>& connection)
2120 {

Callers

nothing calls this directly

Calls 3

AppendServerLogFunction · 0.85
GetHostNameMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected