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

19 lines
409 B
C#
Raw Normal View History

2024-07-15 17:00:04 +03:00
using LiteNetLib;
namespace Syntriax.Engine.Network.Abstract;
public interface INetworkCommunicator
{
2024-07-18 23:07:05 +03:00
event OnPacketReceivedDelegate? OnPacketReceived;
2024-07-15 17:00:04 +03:00
EventBasedNetListener Listener { get; }
NetManager Manager { get; }
void PollEvents();
void Stop();
2024-07-18 23:07:05 +03:00
void Send<T>(NetworkPacket<T> Data);
delegate void OnPacketReceivedDelegate(INetworkCommunicator sender, object packet);
2024-07-15 17:00:04 +03:00
}