MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / GetListing

Method GetListing

src/network/network_coordinator.cpp:505–519  ·  view source on GitHub ↗

* Request a listing of all public servers. */

Source from the content-addressed store, hash-verified

503 * Request a listing of all public servers.
504 */
505void ClientNetworkCoordinatorSocketHandler::GetListing()
506{
507 this->Connect();
508
509 _network_game_list_version++;
510
511 auto p = std::make_unique<Packet>(this, PACKET_COORDINATOR_CLIENT_LISTING);
512 p->Send_uint8(NETWORK_COORDINATOR_VERSION);
513 p->Send_uint8(NETWORK_GAME_INFO_VERSION);
514 p->Send_string(_openttd_revision);
515 p->Send_uint32(this->newgrf_lookup_table_cursor);
516
517 Debug(net, 9, "Coordinator::SendGetListing({}, {})", _openttd_revision, this->newgrf_lookup_table_cursor);
518 this->SendPacket(std::move(p));
519}
520
521/**
522 * Join a server based on an invite code.

Callers 3

~NetworkGameWindowMethod · 0.45
OnClickMethod · 0.45
NetworkGameWindowClass · 0.45

Calls 5

ConnectMethod · 0.95
Send_stringMethod · 0.80
Send_uint32Method · 0.80
Send_uint8Method · 0.45
SendPacketMethod · 0.45

Tested by

no test coverage detected