Implement per-school save functionality by introducing a dedicated save directory and updating the school management system to support loading and saving school states. Revise documentation to reflect these changes, including updates to the architecture and design documents, and enhance the API for reloading schools from disk. Update tests to ensure proper functionality of the new save and reload features.
This commit is contained in:
@@ -5,8 +5,8 @@ namespace HSchool.Server.Net;
|
||||
|
||||
/// <summary>
|
||||
/// One connected browser. Frames are queued instead of written inline so a slow client can never
|
||||
/// stall the game loop; when the outbox overflows the oldest frame is dropped, which is right for
|
||||
/// a clock that is resent 20 times a second.
|
||||
/// stall a school worker; when the outbox overflows the oldest frame is dropped, which is right
|
||||
/// for a clock that is resent 20 times a second.
|
||||
/// </summary>
|
||||
internal sealed class GameClient(uint playerId, WebSocket socket)
|
||||
{
|
||||
@@ -34,8 +34,8 @@ internal sealed class GameClient(uint playerId, WebSocket socket)
|
||||
public bool IsReady => Volatile.Read(ref _ready);
|
||||
|
||||
/// <summary>
|
||||
/// School this connection is watching, or <c>null</c> in the menu. Written by the loop thread,
|
||||
/// read by the connection thread on disconnect.
|
||||
/// School this connection is watching, or <c>null</c> in the menu. Written by the supervisor
|
||||
/// on open/close, read by the connection thread on disconnect.
|
||||
/// </summary>
|
||||
public int? OpenSchoolId
|
||||
{
|
||||
|
||||
@@ -8,7 +8,7 @@ namespace HSchool.Server.Net;
|
||||
/// <summary>
|
||||
/// Drives one WebSocket connection: version handshake, then the receive loop that turns frames
|
||||
/// into commands. Everything it reads from the wire is untrusted, so frames are validated before
|
||||
/// anything reaches the loop thread.
|
||||
/// anything reaches a school worker.
|
||||
/// </summary>
|
||||
internal sealed class GameSocketHandler(
|
||||
ClientRegistry clients,
|
||||
|
||||
Reference in New Issue
Block a user