From bcaef7ef479d152276a31678ca0774108dd9dbab Mon Sep 17 00:00:00 2001 From: RoseOfficial Date: Tue, 20 Jan 2026 14:28:26 -0500 Subject: [PATCH] chore(network): Remove obsolete IGameNetwork interface Remove the dead IGameNetwork interface that was already marked with [Obsolete(..., true)]. Plugins cannot use this interface as the obsolete attribute causes compile errors. The internal GameNetwork class remains unchanged and continues to function for NetworkMonitorWidget and other internal tooling. --- Dalamud/Plugin/Services/IGameNetwork.cs | 54 ------------------------- 1 file changed, 54 deletions(-) delete mode 100644 Dalamud/Plugin/Services/IGameNetwork.cs diff --git a/Dalamud/Plugin/Services/IGameNetwork.cs b/Dalamud/Plugin/Services/IGameNetwork.cs deleted file mode 100644 index cfcf7bc19..000000000 --- a/Dalamud/Plugin/Services/IGameNetwork.cs +++ /dev/null @@ -1,54 +0,0 @@ -using Dalamud.Game.Network; - -namespace Dalamud.Plugin.Services; - -/// -/// This class handles interacting with game network events. -/// -/// -/// -/// DEPRECATED: This interface passes raw unmanaged pointers which are unsafe for the following reasons: -/// -/// -/// No bounds checking on pointer arithmetic - can cause access violations -/// No lifetime management - pointer may be freed while plugin holds it -/// No size information - callers must guess packet boundaries -/// Async usage can cause use-after-free vulnerabilities -/// -/// -/// Migration Guide: -/// -/// -/// For market board data: Use the MarketBoard observable services -/// For duty finder: Use DutyFinder observable services -/// For custom packets: Create typed hooks using Hook<T> with proper packet structures -/// -/// -/// See the Dalamud developer documentation for detailed migration instructions. -/// -/// -[Obsolete("Will be removed in a future release. Use packet handler hooks instead. See XML documentation for migration guide.", true)] -public interface IGameNetwork : IDalamudService -{ - /// - /// The delegate type of a network message event. - /// - /// - /// The pointer to the raw data. WARNING: This pointer has no lifetime guarantees - /// and must not be stored or used asynchronously. - /// - /// The operation ID code. - /// The source actor ID. - /// The target actor ID. - /// The direction of the packet. - public delegate void OnNetworkMessageDelegate(nint dataPtr, ushort opCode, uint sourceActorId, uint targetActorId, NetworkMessageDirection direction); - - /// - /// Event that is called when a network message is sent/received. - /// - /// - /// WARNING: The dataPtr passed to handlers is only valid during the synchronous - /// execution of the handler. Do not store the pointer or use it in async contexts. - /// - public event OnNetworkMessageDelegate NetworkMessage; -}