using System;
namespace SharedLibraryCore.RCon
{
public static class StaticHelpers
{
///
/// defines the type of RCon query sent to a server
///
public enum QueryType
{
///
/// retrieve the status of a server
/// does not require RCon password
///
GET_STATUS,
///
/// retrieve the information of a server
/// server responds with key/value pairs
/// RCon password is required
///
GET_INFO,
///
/// retrieve the value of a DVAR
/// RCon password is required
///
GET_DVAR,
///
/// set the value of a DVAR
/// RCon password is required
///
SET_DVAR,
///
/// execute a command
/// RCon password is required
///
COMMAND,
///
/// get the full server command information
/// RCon password is required
///
COMMAND_STATUS
}
///
/// line seperator char included in response from the server
///
public static char SeperatorChar = (char)int.Parse("0a", System.Globalization.NumberStyles.AllowHexSpecifier);
///
/// timeout in seconds to wait for a socket send or receive before giving up
///
public static readonly int SocketTimeout = 10000;
///
/// interval in milliseconds to wait before sending the next RCon request
///
public static readonly int FloodProtectionInterval = 650;
///
/// how mant failed connection attempts before aborting connection
///
public static readonly int AllowedConnectionFails = 3;
}
}