2023-08-20 04:21:22 -04:00
|
|
|
|
namespace BattleBitAPI
|
2023-03-03 09:15:17 -03:00
|
|
|
|
{
|
|
|
|
|
public static class Const
|
|
|
|
|
{
|
2023-11-30 00:42:43 -03:00
|
|
|
|
public static string Version = "1.0.8v";
|
2023-08-20 03:39:00 -04:00
|
|
|
|
|
2023-03-03 09:15:17 -03:00
|
|
|
|
// ---- Networking ----
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Maximum data size for a single package. 4MB is default.
|
|
|
|
|
/// </summary>
|
|
|
|
|
public const int MaxNetworkPackageSize = 1024 * 1024 * 4;//4mb
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// How long should server/client wait until connection is determined as timed out when no packages is being sent for long time.
|
2023-08-30 09:39:12 -04:00
|
|
|
|
/// </summary>
|
2023-03-03 09:15:17 -03:00
|
|
|
|
public const int NetworkTimeout = 60 * 1000;//60 seconds
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// How frequently client/server will send keep alive to each other when no message is being sent to each other for a while.
|
|
|
|
|
/// </summary>
|
2023-07-27 20:24:00 -04:00
|
|
|
|
public const int NetworkKeepAlive = 5 * 1000;//15 seconds
|
2023-03-03 09:15:17 -03:00
|
|
|
|
/// <summary>
|
2023-03-03 11:42:13 -03:00
|
|
|
|
/// How long server/client will wait other side to send their hail/initial package. In miliseconds.
|
2023-03-03 09:15:17 -03:00
|
|
|
|
/// </summary>
|
2023-07-27 20:24:00 -04:00
|
|
|
|
#if DEBUG
|
|
|
|
|
public const int HailConnectTimeout = 20 * 1000;
|
|
|
|
|
#else
|
2023-03-03 09:15:17 -03:00
|
|
|
|
public const int HailConnectTimeout = 2 * 1000;
|
2023-07-27 20:24:00 -04:00
|
|
|
|
#endif
|
2023-03-03 09:15:17 -03:00
|
|
|
|
|
|
|
|
|
// ---- Server Fields ----
|
|
|
|
|
public const int MinServerNameLength = 5;
|
|
|
|
|
public const int MaxServerNameLength = 400;
|
|
|
|
|
|
2023-08-17 11:39:20 -04:00
|
|
|
|
public const int MaxTokenSize = 512;
|
|
|
|
|
|
2023-03-03 09:15:17 -03:00
|
|
|
|
public const int MinGamemodeNameLength = 2;
|
2023-08-27 14:45:27 -04:00
|
|
|
|
public const int MaxGamemodeNameLength = 64;
|
2023-03-03 09:15:17 -03:00
|
|
|
|
|
|
|
|
|
public const int MinMapNameLength = 2;
|
2023-08-27 14:45:27 -04:00
|
|
|
|
public const int MaxMapNameLength = 64;
|
2023-03-03 09:15:17 -03:00
|
|
|
|
|
|
|
|
|
public const int MinLoadingScreenTextLength = 0;
|
|
|
|
|
public const int MaxLoadingScreenTextLength = 1024 * 8;
|
|
|
|
|
|
|
|
|
|
public const int MinServerRulesTextLength = 0;
|
|
|
|
|
public const int MaxServerRulesTextLength = 1024 * 8;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|