feat: implement multiplayer session state management and add invalid port exception

This commit is contained in:
2026-08-25 02:10:54 +02:00
parent 988f1102f8
commit 1445fc014f
7 changed files with 64 additions and 16 deletions
@@ -1,6 +1,7 @@
namespace Game.Features.Multiplayer.Contracts.Exceptions;
/// <summary>
/// Thrown when trying to host or join while already connected to a session.
/// Thrown when trying to host or join while connecting or already connected to a session.
/// </summary>
public sealed class MultiplayerAlreadyConnectedException() : MultiplayerException("Already connected to a session.");
public sealed class MultiplayerAlreadyConnectedException()
: MultiplayerException("Already connected to or connecting with a session.");
@@ -0,0 +1,4 @@
namespace Game.Features.Multiplayer.Contracts.Exceptions;
public sealed class MultiplayerInvalidPortException(int port)
: MultiplayerException($"Invalid port {port}. Port must be between 1 and 65535.");
@@ -0,0 +1 @@
uid://d3n8p5w2y7c4h