IUdpProxy.cs 497 B

12345678910111213141516
  1. using System;
  2. using System.Net;
  3. using System.Threading;
  4. using System.Threading.Tasks;
  5. namespace STUN.Interfaces
  6. {
  7. public interface IUdpProxy : IDisposable
  8. {
  9. TimeSpan Timeout { get; set; }
  10. IPEndPoint LocalEndPoint { get; }
  11. Task ConnectAsync(CancellationToken token = default);
  12. Task<(byte[], IPEndPoint, IPAddress)> ReceiveAsync(byte[] bytes, IPEndPoint remote, EndPoint receive, CancellationToken token = default);
  13. Task DisconnectAsync();
  14. }
  15. }