23 #ifndef DOOMSEEKER_REFRESHER_REFRESHER_H
24 #define DOOMSEEKER_REFRESHER_REFRESHER_H
29 #define gRefresher (Refresher::instance())
74 static bool isInstantiated();
75 static void deinstantiate();
99 class MasterClientInfo;
101 static const int MASTER_SERVER_TIMEOUT_DELAY = 10000;
103 static QMutex instanceMutex;
109 bool isAnythingToRefresh()
const;
110 Server* findRefreshingServer(
const QHostAddress& address,
unsigned short port);
112 void purgeNullServers();
114 void readPendingDatagram();
116 void startNewServerRefresh();
117 void resendCurrentServerRefreshesIfTimeout();
124 bool tryReadDatagramByMasterClient(QHostAddress& address,
125 unsigned short port, QByteArray& packet);
130 bool tryReadDatagramByServer(
const QHostAddress& address,
131 unsigned short port, QByteArray& packet);
136 void attemptTimeoutMasters();
137 void masterFinishedRefreshing();
138 void readAllPendingDatagrams();
139 void sendMasterQueries();
140 void sendServerQueries();
void setDelayBetweenResends(int delay)
A representation of a server for a given game.
void registerMaster(MasterClient *pMaster)
bool registerServer(Server *server)
Abstract base for all MasterClients.