LobbyServer/LobbyServerDto/LobbyUpdate.cs

51 lines
1.7 KiB
C#

using System.ComponentModel.DataAnnotations;
using System.Net;
namespace LobbyServerDto
{
/// <summary>
/// If the host updates values of the lobby, it can send this request to update the lobby information on the lobby server
/// </summary>
[LobbyMessage]
public partial class LobbyUpdate
{
/// <summary>
/// The displayname of the lobby
/// </summary>
public string Name { get; set; } = string.Empty;
/// <summary>
/// The game mode of the lobby
/// </summary>
public int GameMode { get; set; }
/// <summary>
/// Current count of players in the lobby
/// </summary>
public int PlayerCount { get; set; }
/// <summary>
/// Max players in the lobby
/// </summary>
public int MaxPlayerCount { get; set; }
/// <summary>
/// The hash of the password required to enter this lobby
/// </summary>
public byte[]? PasswordHash { get; set; }
/// <summary>
/// The salt used to hash the password.
/// </summary>
[MaxLength(16)]
public byte[]? PasswordSalt { get; set; }
/// <summary>
/// The hosts ip addresses locally detected. Used the the host information send to clients on their request.
/// </summary>
[MaxLength(32)]
public IPAddress[]? HostIps { get; set; }
/// <summary>
/// The hosts port. Used the the host information send to clients on their request.
/// </summary>
public int HostPort { get; set; }
/// <summary>
/// The hosts echo port to try if a connection is possible.
/// </summary>
public int HostTryPort { get; set; }
}
}