using System; using System.Threading.Tasks; using MongoDB.Bson; namespace Common.Network { public enum NetworkProtocol { TCP, UDP, } public interface IService: IDisposable { /// /// 将函数调用加入IService线程 /// /// void Add(Action action); AChannel GetChannel(ObjectId id); Task GetChannel(string host, int port); Task GetChannel(); void Remove(AChannel channel); void Run(); } }