23 lines
553 B
C#
23 lines
553 B
C#
using System;
|
|
|
|
using LiteNetLib;
|
|
using LiteNetLib.Utils;
|
|
|
|
using Syntriax.Engine.Core.Abstract;
|
|
|
|
namespace Syntriax.Engine.Network.Abstract;
|
|
|
|
public interface INetworkCommunicator
|
|
{
|
|
EventBasedNetListener Listener { get; }
|
|
NetManager Manager { get; }
|
|
|
|
void PollEvents();
|
|
void Stop();
|
|
|
|
void RegisterEntityListener(IEntity entity, Action<NetPacketReader, NetPeer> onDataReceived);
|
|
void UnregisterEntityListener(IEntity entity);
|
|
NetDataWriter GetEntityWriter(IEntity entity);
|
|
NetDataWriter GetMessageWriter(IEntity entity);
|
|
}
|