| 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 | { |
nothing calls this directly
no test coverage detected