Add alpha session gate with cookie auth and login UI.

This commit is contained in:
Leonid Pershin
2026-08-20 07:17:18 +03:00
parent 2a55a025f4
commit a444fc011e
24 changed files with 1005 additions and 27 deletions
+2 -1
View File
@@ -19,9 +19,10 @@ internal sealed class GameSocketHandler(
{
private static readonly TimeSpan HandshakeTimeout = TimeSpan.FromSeconds(5);
public async Task HandleAsync(WebSocket socket, CancellationToken cancellationToken)
public async Task HandleAsync(WebSocket socket, string userName, CancellationToken cancellationToken)
{
var client = clients.Add(socket);
client.SetUserName(userName);
var buffer = ArrayPool<byte>.Shared.Rent(ProtocolConstants.MaxMessageSize);
using var connectionCts = CancellationTokenSource.CreateLinkedTokenSource(cancellationToken);