/// <summary> /// Tries to ping the server. /// </summary> /// <returns></returns> public int Ping() { IServerQuery query = null; int iPingResult = -1; switch (GameType) { case EGame.Source: query = new SourceServer(IP, Port); break; default: break; } iPingResult = query.PingServer(); return iPingResult; }
/// <summary> /// Tries to get all the server infos. /// </summary> /// <param name="gs">GameServer instance to fill with the information.</param> public GameServer GetInfo() { IServerQuery query=null; GameServer gameServer = null; switch (GameType) { case EGame.Source: query = new SourceServer(IP,Port); var self = this; query.QueryServerInfo(ref self); break; default: break; } return gameServer; }