Binary support

This commit is contained in:
twoischnig committed 2023-12-01 22:58:44 +01:00
1 parent 840218f119
commit 97df572f1e
21 files changed
+310 -45

No files matched your search

+6 -1
View File
@@ -33,9 +33,14 @@ namespace LobbyServerDto
/// <summary>
/// The hash of a password to protect the lobby. Only users with the password can request host information/nat punch.
/// </summary>
[MaxLength(26)]
[MaxLength(64)]
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. Used the the host information send to clients on their request.
/// </summary>
[MaxLength(32)]
+9 -2
View File
@@ -1,4 +1,6 @@
namespace LobbyServerDto
using System.ComponentModel.DataAnnotations;
namespace LobbyServerDto
{
/// <summary>
/// Send when a lobby is created or updates, this contains the lobby information
@@ -29,6 +31,11 @@
/// <summary>
/// True if the lobby requires a password to gain access
/// </summary>
public bool PasswordProtected { get; set; }
public bool PasswordProtected { get; set; }
/// <summary>
/// The salt used to hash the password.
/// </summary>
[MaxLength(16)]
public byte[]? PasswordSalt { get; set; }
}
}
+7
View File
@@ -0,0 +1,7 @@
namespace LobbyServerDto
{
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Interface, AllowMultiple = false, Inherited = false)]
public class LobbyMessageAttribute : Attribute
{
}
}
+3 -1
View File
@@ -1,4 +1,6 @@
namespace LobbyServerDto
using System;
namespace LobbyServerDto
{
/// <summary>
/// Used to read the message identifer from a received object
+7 -2
View File
@@ -3,12 +3,17 @@
<PropertyGroup>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>netstandard2.0</TargetFramework>
<LangVersion>latest</LangVersion>
<EmitCompilerGeneratedFiles>true</EmitCompilerGeneratedFiles>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="System.ComponentModel.Annotations" Version="5.0.0" />
<PackageReference Include="System.Memory" Version="4.5.5" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\LobbyServerSourceGenerator\LobbyServerSourceGenerator.csproj" OutputItemType="Analyzer" />
<ProjectReference Include="..\LobbyServerSourceGenerator\LobbyServerSourceGenerator.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false" />
</ItemGroup>
</Project>
+5
View File
@@ -29,6 +29,11 @@ namespace LobbyServerDto
/// </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
/// </summary>
[MaxLength(32)]