Engine-Pong/Game/Network/INetworkCommunicator.cs

20 lines
470 B
C#

using System;
using LiteNetLib;
using LiteNetLib.Utils;
using Syntriax.Engine.Core.Abstract;
namespace Pong.Network;
public interface INetworkCommunicator
{
EventBasedNetListener Listener { get; }
NetManager Manager { get; }
void PollEvents();
void Stop();
void RegisterEntityListener(IEntity entity, Action<NetPacketReader> onDataReceived);
void UnregisterEntityListener(IEntity entity);
NetDataWriter GetEntityWriter(IEntity entity);
}