AService.cs 469 B

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