class Durian::Resolver
- Durian::Resolver
- Reference
- Object
Defined in:
durian/resolver.crdurian/resolver/fetch_list.cr
durian/resolver/pending_list.cr
durian/resolver/server.cr
Constant Summary
-
IPAddressRecordFlags =
[RecordFlag::A, RecordFlag::AAAA]
Constructors
- .new(dnsServers : Array(Server))
- .new(dns_server : Socket::IPAddress = Socket::IPAddress.new("8.8.8.8", 53), protocol : Protocol = Protocol::UDP)
Class Method Summary
- .fetch_ip_cache(host : String, port : Int32, ip_cache : Cache::IPAddress | Nil)
- .from_cloudflare(host : String, port : Int32, resolver : Resolver) : Tuple(UInt64, Array(Socket::IPAddress)) | Nil
- .get_tcp_socket!(host : String, port : Int32, resolver : Resolver, connect_timeout : Int | Float | Nil = nil) : ::TCPSocket
- .get_udp_socket!(host : String, port : Int32, resolver : Resolver, connect_timeout : Int | Float | Nil = nil) : UDPSocket
- .getaddrinfo!(host : String, port : Int32, resolver : Resolver, try_connect : Bool = true) : Tuple(Fetch, Socket::IPAddress)
- .getaddrinfo_all(host : String, port : Int32, resolver : Resolver, &block : Tuple(Fetch, Array(Socket::IPAddress)) -> )
- .getaddrinfo_all(host : String, port : Int32, ip_cache : Cache::IPAddress | Nil = nil, dns_server : Socket::IPAddress = Socket::IPAddress.new("8.8.8.8", 53), protocol : Protocol = Protocol::UDP, tls : Server::TransportLayerSecurity | Nil = nil, &block : FetchList -> )
- .getaddrinfo_all(host : String, port : Int32, resolver : Resolver) : FetchList
- .getaddrinfo_all(host : String, port : Int32, ip_cache : Cache::IPAddress | Nil = nil, dns_server : Socket::IPAddress = Socket::IPAddress.new("8.8.8.8", 53), protocol : Protocol = Protocol::UDP, tls : Server::TransportLayerSecurity | Nil = nil) : FetchList
- .getaddrinfo_all(host : String, port : Int32, ip_cache : Cache::IPAddress | Nil, dns_server : Array(Server), &block : FetchList -> )
- .getaddrinfo_all(host : String, port : Int32, ip_cache : Cache::IPAddress | Nil, dns_server : Array(Server)) : FetchList
Instance Method Summary
- #cache_expires?(host, flags : Array(RecordFlag))
- #cloudflare?(host : String, port : Int32 | Nil = 0) : Option::Cloudflare | Nil
- #coffee : Coffee::Scanner?
- #coffee=(value : Coffee::Scanner)
- #dnsServers : Array(Server)
- #dnsServers=(dnsServers : Array(Server))
- #fetch_cache(host, flags : Array(RecordFlag), resolve_response : ResolveResponse)
- #fetch_record_cache(host, flag : RecordFlag)
- #get_socket_protocol(socket : IO) : Protocol | Nil
- #getaddrinfoPendingList : PendingList
- #getaddrinfoPendingList=(getaddrinfoPendingList : PendingList)
- #ip_cache : Durian::Cache::IPAddress?
- #ip_cache=(value : Cache::IPAddress)
- #mapping?(host : String, port : Int32 | Nil = 0) : Option::Mapping | Nil
- #mapping_local?(item, port : Int32 = 0) : Array(Socket::IPAddress) | Nil
- #mapping_to?(item, port : Int32 = 0) : Tuple(String, Int32) | Nil
- #mismatch_retry
- #mutex : Mutex
- #mutex=(mutex : Mutex)
- #option : Option
- #option=(option : Option)
- #pending_getaddrinfo_fetch(host : String, port : Int32, resolver : Resolver) : Nil
- #query_record!(specify : Array(Server) | Nil, host : String, flag : RecordFlag, strict_answer : Bool = false) : Array(Packet) | Nil
- #query_record!(socket : IO | Nil, host : String, flag : RecordFlag, strict_answer : Bool = false) : Packet | Nil
- #record_cache : Durian::Cache::Record?
- #record_cache=(value : Cache::Record)
- #resolve(host, flag : RecordFlag, strict_answer : Bool = false, &callback : ResolveResponse -> )
- #resolve(host, flags : Array(RecordFlag), strict_answer : Bool = false, &callback : ResolveResponse -> )
- #resolve_task(specify : Array(Server) | Nil, host : String, task : ResolveTask)
- #run
- #set_record_cache(host, packets : Array(Packet), flag : RecordFlag)
- #set_record_cache(host, packet : Packet, flag : RecordFlag)
- #specify?(host : String, port : Int32 | Nil = 0) : Option::Specify | Nil
- #tasks : Hash(String, Hash(String, ResolveTask))
- #tasks=(tasks : Hash(String, Hash(String, ResolveTask)))
- #to_ip_address(host : String)
Constructor Detail
def self.new(dns_server : Socket::IPAddress = Socket::IPAddress.new("8.8.8.8", 53), protocol : Protocol = Protocol::UDP)
#
Class Method Detail
def self.fetch_ip_cache(host : String, port : Int32, ip_cache : Cache::IPAddress | Nil)
#
def self.from_cloudflare(host : String, port : Int32, resolver : Resolver) : Tuple(UInt64, Array(Socket::IPAddress)) | Nil
#
def self.get_tcp_socket!(host : String, port : Int32, resolver : Resolver, connect_timeout : Int | Float | Nil = nil) : ::TCPSocket
#
def self.get_udp_socket!(host : String, port : Int32, resolver : Resolver, connect_timeout : Int | Float | Nil = nil) : UDPSocket
#
def self.getaddrinfo!(host : String, port : Int32, resolver : Resolver, try_connect : Bool = true) : Tuple(Fetch, Socket::IPAddress)
#
def self.getaddrinfo_all(host : String, port : Int32, resolver : Resolver, &block : Tuple(Fetch, Array(Socket::IPAddress)) -> )
#
def self.getaddrinfo_all(host : String, port : Int32, ip_cache : Cache::IPAddress | Nil = nil, dns_server : Socket::IPAddress = Socket::IPAddress.new("8.8.8.8", 53), protocol : Protocol = Protocol::UDP, tls : Server::TransportLayerSecurity | Nil = nil, &block : FetchList -> )
#
def self.getaddrinfo_all(host : String, port : Int32, ip_cache : Cache::IPAddress | Nil = nil, dns_server : Socket::IPAddress = Socket::IPAddress.new("8.8.8.8", 53), protocol : Protocol = Protocol::UDP, tls : Server::TransportLayerSecurity | Nil = nil) : FetchList
#
def self.getaddrinfo_all(host : String, port : Int32, ip_cache : Cache::IPAddress | Nil, dns_server : Array(Server), &block : FetchList -> )
#
def self.getaddrinfo_all(host : String, port : Int32, ip_cache : Cache::IPAddress | Nil, dns_server : Array(Server)) : FetchList
#
Instance Method Detail
def query_record!(specify : Array(Server) | Nil, host : String, flag : RecordFlag, strict_answer : Bool = false) : Array(Packet) | Nil
#
def query_record!(socket : IO | Nil, host : String, flag : RecordFlag, strict_answer : Bool = false) : Packet | Nil
#
def resolve(host, flag : RecordFlag, strict_answer : Bool = false, &callback : ResolveResponse -> )
#
def resolve(host, flags : Array(RecordFlag), strict_answer : Bool = false, &callback : ResolveResponse -> )
#