Codechange: track version of network servers to prune once out-of-date

This commit is contained in:
Patric Stout
2021-04-29 16:30:42 +02:00
committed by Patric Stout
parent cbaac5609f
commit e1e2212e0e
5 changed files with 41 additions and 5 deletions

View File

@@ -26,15 +26,17 @@ struct NetworkGameList {
bool online = false; ///< False if the server did not respond (default status)
bool manually = false; ///< True if the server was added manually
uint8 retries = 0; ///< Number of retries (to stop requerying)
int version = 0; ///< Used to see which servers are no longer available on the Game Coordinator and can be removed.
NetworkGameList *next = nullptr; ///< Next pointer to make a linked game list
};
/** Game list of this client */
extern NetworkGameList *_network_game_list;
extern int _network_game_list_version;
void NetworkGameListAddItemDelayed(NetworkGameList *item);
NetworkGameList *NetworkGameListAddItem(const std::string &connection_string);
void NetworkGameListRemoveItem(NetworkGameList *remove);
void NetworkGameListRemoveExpired();
void NetworkGameListRequery();
#endif /* NETWORK_GAMELIST_H */