Engine-Pong/Game/Network/Abstract/INetworkCommunicator.cs

19 lines
409 B
C#

using LiteNetLib;
namespace Syntriax.Engine.Network.Abstract;
public interface INetworkCommunicator
{
event OnPacketReceivedDelegate? OnPacketReceived;
EventBasedNetListener Listener { get; }
NetManager Manager { get; }
void PollEvents();
void Stop();
void Send<T>(NetworkPacket<T> Data);
delegate void OnPacketReceivedDelegate(INetworkCommunicator sender, object packet);
}