RUDPClient/Assets/Scripts/Network/NetworkTransport/ITransport.cs

16 lines
336 B
C#

using System;
using System.Net;
using System.Threading.Tasks;
namespace Network.NetworkTransport
{
public interface ITransport
{
void SendTo(byte[] data, IPEndPoint target);
void SendToAll(byte[] data);
event Action<byte[], IPEndPoint> OnReceive;
Task StartAsync();
void Stop();
}
}