* Send the client information about a client. * @param ci The client to send information about. */
| 323 | * @param ci The client to send information about. |
| 324 | */ |
| 325 | NetworkRecvStatus ServerNetworkGameSocketHandler::SendClientInfo(NetworkClientInfo *ci) |
| 326 | { |
| 327 | Debug(net, 9, "client[{}] SendClientInfo(): client_id={}", this->client_id, ci->client_id); |
| 328 | |
| 329 | if (ci->client_id != INVALID_CLIENT_ID) { |
| 330 | auto p = std::make_unique<Packet>(this, PACKET_SERVER_CLIENT_INFO); |
| 331 | p->Send_uint32(ci->client_id); |
| 332 | p->Send_uint8 (ci->client_playas); |
| 333 | p->Send_string(ci->client_name); |
| 334 | p->Send_string(ci->public_key); |
| 335 | |
| 336 | this->SendPacket(std::move(p)); |
| 337 | } |
| 338 | return NETWORK_RECV_STATUS_OKAY; |
| 339 | } |
| 340 | |
| 341 | /** Send the client information about the server. */ |
| 342 | NetworkRecvStatus ServerNetworkGameSocketHandler::SendGameInfo() |
no test coverage detected