using System; using System.Threading.Tasks; namespace Network { public interface IService: IDisposable { /// /// 将函数调用加入IService线程 /// /// void Add(Action action); Task GetChannel(string host, int port); Task GetChannel(string address); Task GetChannel(); void Remove(IChannel channel); void RunOnce(int timeout); void Run(); } }