AService.cs 502 B

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