using System.Collections.Generic;
using System.Net;
using System.Threading;
using System.Threading.Tasks;
namespace FastGithub.DomainResolve
{
    /// 
    /// 域名解析器
    /// 
    public interface IDomainResolver
    {
        /// 
        /// 预加载
        /// 
        /// 域名
        void Prefetch(string domain);
        /// 
        /// 解析ip
        /// 
        /// 节点
        /// 
        /// 
        Task ResolveAnyAsync(DnsEndPoint endPoint, CancellationToken cancellationToken = default);
        /// 
        /// 解析所有ip
        /// 
        /// 节点
        /// 
        /// 
        IAsyncEnumerable ResolveAllAsync(DnsEndPoint endPoint, CancellationToken cancellationToken = default);
        /// 
        /// 对所有节点进行测速
        /// 
        /// 
        /// 
        Task TestAllEndPointsAsync(CancellationToken cancellationToken = default);
    }
}