summaryrefslogtreecommitdiff
path: root/src/network/network_internal.h
diff options
context:
space:
mode:
authorPatric Stout <truebrain@openttd.org>2021-05-05 23:21:14 +0200
committerGitHub <noreply@github.com>2021-05-05 23:21:14 +0200
commitf94fb9377910c63fc8e1ea0ede1d96603e4d8862 (patch)
tree9b8041b53749744b4df075520181294806332e07 /src/network/network_internal.h
parentead30dc725c60cac8bc13c86d18b179dac684bec (diff)
downloadopenttd-f94fb9377910c63fc8e1ea0ede1d96603e4d8862.tar.xz
Codechange: use connection_string in favour of NetworkAddress (#9197)
We now resolve the connection_string to a NetworkAddress in a much later state. This means there are fewer places constructing a NetworkAddress. The main benefit of this is in later PRs that introduce different types of NetworkAddresses. Storing this in things like NetworkGameList is rather complex, especially as NetworkAddress has to be mutable at all times. Additionally, the NetworkAddress is a complex object to store simple information: how to connect to this server.
Diffstat (limited to 'src/network/network_internal.h')
-rw-r--r--src/network/network_internal.h4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/network/network_internal.h b/src/network/network_internal.h
index 1fba1228a..ef414c46a 100644
--- a/src/network/network_internal.h
+++ b/src/network/network_internal.h
@@ -87,7 +87,7 @@ extern uint8 _network_reconnect;
extern CompanyMask _network_company_passworded;
-void NetworkTCPQueryServer(NetworkAddress address, bool request_company_info = false);
+void NetworkTCPQueryServer(const std::string &connection_string, bool request_company_info = false);
void GetBindAddresses(NetworkAddressList *addresses, uint16 port);
struct NetworkGameList *NetworkAddServer(const std::string &connection_string);
@@ -119,8 +119,6 @@ StringID GetNetworkErrorMsg(NetworkErrorCode err);
bool NetworkFindName(char *new_name, const char *last);
const char *GenerateCompanyPasswordHash(const char *password, const char *password_server_id, uint32 password_game_seed);
-bool NetworkClientConnectGame(NetworkAddress &address, CompanyID join_as, const char *join_server_password = nullptr, const char *join_company_password = nullptr);
NetworkAddress ParseConnectionString(const std::string &connection_string, int default_port);
-NetworkAddress ParseGameConnectionString(CompanyID *company, const std::string &connection_string, int default_port);
#endif /* NETWORK_INTERNAL_H */