* Send an update of our server status to the Game Coordinator. */
| 486 | * Send an update of our server status to the Game Coordinator. |
| 487 | */ |
| 488 | void ClientNetworkCoordinatorSocketHandler::SendServerUpdate() |
| 489 | { |
| 490 | Debug(net, 6, "Sending server update to Game Coordinator"); |
| 491 | |
| 492 | auto p = std::make_unique<Packet>(this, PACKET_COORDINATOR_SERVER_UPDATE, TCP_MTU); |
| 493 | p->Send_uint8(NETWORK_COORDINATOR_VERSION); |
| 494 | SerializeNetworkGameInfo(*p, GetCurrentNetworkServerGameInfo(), this->next_update.time_since_epoch() != std::chrono::nanoseconds::zero()); |
| 495 | |
| 496 | Debug(net, 9, "Coordinator::SendServerUpdate()"); |
| 497 | this->SendPacket(std::move(p)); |
| 498 | |
| 499 | this->next_update = std::chrono::steady_clock::now() + NETWORK_COORDINATOR_DELAY_BETWEEN_UPDATES; |
| 500 | } |
| 501 | |
| 502 | /** |
| 503 | * Request a listing of all public servers. |
no test coverage detected