Engine-Pong/Game/Network/INetworkCommunicator.cs

20 lines
470 B
C#
Raw Normal View History

2024-02-02 12:20:25 +03:00
using System;
using LiteNetLib;
2024-02-02 12:42:59 +03:00
using LiteNetLib.Utils;
2024-02-02 12:20:25 +03:00
using Syntriax.Engine.Core.Abstract;
namespace Pong.Network;
public interface INetworkCommunicator
{
EventBasedNetListener Listener { get; }
NetManager Manager { get; }
void PollEvents();
void Stop();
2024-02-02 12:42:59 +03:00
void RegisterEntityListener(IEntity entity, Action<NetPacketReader> onDataReceived);
void UnregisterEntityListener(IEntity entity);
NetDataWriter GetEntityWriter(IEntity entity);
2024-02-02 12:20:25 +03:00
}