using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using VRage; using VRage.Library.Collections; using VRage.Network; namespace Torch.API.Managers { /// /// API for the network intercept. /// public interface INetworkManager : IManager { /// /// Register a network handler. /// void RegisterNetworkHandler(INetworkHandler handler); /// /// Unregister a network handler. /// /// true if the handler was unregistered, false if it wasn't registered to begin with bool UnregisterNetworkHandler(INetworkHandler handler); } /// /// Handler for multiplayer network messages. /// public interface INetworkHandler { /// /// Returns if the handler can process the call site. /// bool CanHandle(CallSite callSite); /// /// Processes a network message. /// /// true if the message should be discarded bool Handle(ulong remoteUserId, CallSite site, BitStream stream, object obj, MyPacket packet); } }