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

Function NetworkQueryServer

src/network/network.cpp:671–682  ·  view source on GitHub ↗

* Query a server to fetch the game-info. * @param connection_string the address to query. */

Source from the content-addressed store, hash-verified

669 * @param connection_string the address to query.
670 */
671void NetworkQueryServer(std::string_view connection_string)
672{
673 if (!_network_available) return;
674
675 Debug(net, 9, "NetworkQueryServer(): connection_string={}", connection_string);
676
677 /* Mark the entry as refreshing, so the GUI can show the refresh is pending. */
678 NetworkGame *item = NetworkGameListAddItem(connection_string);
679 item->refreshing = true;
680
681 TCPConnecter::Create<TCPQueryConnecter>(connection_string);
682}
683
684/**
685 * Validates an address entered as a string and adds the server to

Callers 2

NetworkAddServerFunction · 0.85
OnClickMethod · 0.85

Calls 1

NetworkGameListAddItemFunction · 0.85

Tested by

no test coverage detected