AService.cs 476 B

12345678910111213141516171819202122232425262728
  1. using System;
  2. using System.Net;
  3. using System.Threading.Tasks;
  4. namespace Model
  5. {
  6. public enum NetworkProtocol
  7. {
  8. TCP,
  9. UDP,
  10. KCP,
  11. }
  12. public abstract class AService: IDisposable
  13. {
  14. public abstract AChannel GetChannel(long id);
  15. public abstract Task<AChannel> AcceptChannel();
  16. public abstract AChannel ConnectChannel(IPEndPoint ipEndPoint);
  17. public abstract void Remove(long channelId);
  18. public abstract void Update();
  19. public abstract void Dispose();
  20. }
  21. }