AService.cs 450 B

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