![]() |
VOOZH | about |
dotnet add package Lakona.Game.Server.Hotfix --version 0.2.3
NuGet\Install-Package Lakona.Game.Server.Hotfix -Version 0.2.3
<PackageReference Include="Lakona.Game.Server.Hotfix" Version="0.2.3" />
<PackageVersion Include="Lakona.Game.Server.Hotfix" Version="0.2.3" />Directory.Packages.props
<PackageReference Include="Lakona.Game.Server.Hotfix" />Project file
paket add Lakona.Game.Server.Hotfix --version 0.2.3
#r "nuget: Lakona.Game.Server.Hotfix, 0.2.3"
#:package Lakona.Game.Server.Hotfix@0.2.3
#addin nuget:?package=Lakona.Game.Server.Hotfix&version=0.2.3Install as a Cake Addin
#tool nuget:?package=Lakona.Game.Server.Hotfix&version=0.2.3Install as a Cake Tool
Runtime loader and dispatch infrastructure for server-side Lakona.Game hotfix assemblies.
This package keeps reload mechanics separate from actor runtime, sessions, transports, and gameplay code.
Lakona.Game hotfix separates stable state from replaceable logic:
stable actor or state object + reloadable static behavior methods
Actors, room loops, timers, persistence, RPC contracts, transports, and long-lived mutable state stay in stable assemblies. Hotfix assemblies contain stateless business rules that operate on stable state objects. A reload replaces the runtime dispatch table; it does not replace existing actor or state instances.
Hotfix behaviors should return stable DTOs that describe what happened. Stable runtime code should perform side effects such as persistence writes, leaderboard updates, session cleanup, logging, and network pushes.
Reload uses next-entry semantics: a method already executing keeps the version it resolved, while the next dispatch call sees the new table after a successful reload. If reload fails, the previous dispatch table remains active.
Stable code owns state:
[HotfixState]
public partial class PlayerActor : Actor
{
private int level;
private int exp;
}
Hotfix code owns behavior:
[FriendOf(typeof(PlayerActor))]
[HotfixBehaviorOf(typeof(PlayerActor))]
public static class PlayerActorBehavior
{
public static void AddExp(this PlayerActor self, int amount)
{
var exp = self.__hotfix_exp();
}
}
Reload with IHotfixManager.ReloadAsync(). Reload failure keeps the previous dispatch table active.
Use AddLakonaGameHotfix(...) to register a source such as CurrentDirectoryHotfixAssemblySource, and pass stable assembly names as shared assemblies so Hotfix behaviors operate on the same state types as the running server. AddLakonaGameHotfixFileWatcher(...) can be added when a host should reload after hotfix DLL changes.
HotfixManager must be the only component that loads hotfix assemblies. Hosts must not call Assembly.LoadFrom on files in the hotfix directory. Reload reads the main hotfix DLL, adjacent PDB, and managed dependency DLLs into memory via stream loading before loading them into a collectible AssemblyLoadContext, validates shared type identity, and publishes the dispatch table only after validation succeeds. Native dependencies continue to use path-based loading.
Use version-pointer deployment for production:
hotfix/current.txt
hotfix/versions/<version>/Server.Hotfix.dll
hotfix/versions/<version>/Server.Hotfix.pdb
The pointer should change only after the version directory is fully written.
The first implementation uses one process-global dispatch table. Treat it as one hotfix domain per server process; do not register unrelated hotfix managers that should carry independent behavior in the same process.
Generated friend accessors are public members on [HotfixState] partial types because the hotfix assembly must be able to call them across an assembly boundary. [FriendOf] is metadata and convention for Hotfix behaviors, not a CLR security boundary. Only mark stable state types where exposing generated __hotfix_ accessors is acceptable, and keep sensitive runtime internals outside those state types.
Generated server apps discover [RpcService] contracts at build time and emit stable service proxies that call hotfix methods through HotfixServiceCall<TRequest> or HotfixServiceCall<TRequest, TCallback>. Hotfix assemblies implement those contracts with exactly one [HotfixService(typeof(IMyService))] static class per generated service contract. Reload validation rejects missing or duplicate required service implementations before publishing a new dispatch table.
State shape changes, protocol changes, serializer changes, persistent schema changes, and actor runtime changes are not hotfixes. Deploy or migrate stable assemblies for those changes.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 net10.0 is compatible. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
Showing the top 1 NuGet packages that depend on Lakona.Game.Server.Hotfix:
| Package | Downloads |
|---|---|
|
Lakona.Game.Server
Server-side actor runtime, RPC hosting helpers, session lifecycle, and reliable push infrastructure for Lakona.Game applications. |
This package is not used by any popular GitHub repositories.