mirror of
https://github.com/EpinelPS/EpinelPS.git
synced 2025-12-13 23:44:45 +01:00
clean up code
This commit is contained in:
@@ -38,9 +38,6 @@ namespace nksrv.LobbyServer
|
||||
}
|
||||
public static async Task DispatchSingle(IHttpContext ctx)
|
||||
{
|
||||
//var x = new RedirectionHandler();
|
||||
//await x.HandleAsync(ctx);
|
||||
//return;
|
||||
LobbyMsgHandler? handler = null;
|
||||
foreach (var item in Handlers)
|
||||
{
|
||||
@@ -53,11 +50,9 @@ namespace nksrv.LobbyServer
|
||||
if (handler == null)
|
||||
{
|
||||
ctx.Response.StatusCode = 404;
|
||||
//Logger.Error("HTTPS: No handler for /v1/" + ctx.RequestedPath);
|
||||
}
|
||||
else
|
||||
{
|
||||
// todo move everClass1.csything to its own handler
|
||||
handler.Reset();
|
||||
await handler.HandleAsync(ctx);
|
||||
return;
|
||||
@@ -75,7 +70,6 @@ namespace nksrv.LobbyServer
|
||||
|
||||
var info = new GameClientInfo() { ClientPublicKey = publicKey.ToArray() };
|
||||
|
||||
|
||||
var box = SodiumKeyExchange.CalculateServerSharedSecret(JsonDb.ServerPublicKey, JsonDb.ServerPrivateKey, publicKey.ToArray());
|
||||
|
||||
info.Keys = box;
|
||||
@@ -157,19 +151,18 @@ namespace nksrv.LobbyServer
|
||||
/// <summary>
|
||||
/// Client public key generated by game client
|
||||
/// </summary>
|
||||
public byte[] ClientPublicKey;
|
||||
public byte[] ClientPublicKey = [];
|
||||
/// <summary>
|
||||
/// Authentication token
|
||||
/// </summary>
|
||||
public string ClientAuthToken;
|
||||
public string ClientAuthToken = "";
|
||||
/// <summary>
|
||||
/// Rx/Tx key pair
|
||||
/// </summary>
|
||||
public SodiumKeyExchangeSharedSecretBox Keys;
|
||||
public SodiumKeyExchangeSharedSecretBox Keys = new();
|
||||
/// <summary>
|
||||
/// User ID of the user
|
||||
/// </summary>
|
||||
public ulong UserId;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user