class

Durian::Resolver

Inherits Reference / Object

Constants

IPAddressRecordFlags = [RecordFlag::A, RecordFlag::AAAA]

Constructors

new(dnsServers : Array(Server))
Source
new(dns_server : Socket::IPAddress = Socket::IPAddress.new("8.8.8.8", 53), protocol : Protocol = Protocol::UDP)
Source

Class methods

fetch_ip_cache(host : String, port : Int32, ip_cache : Cache::IPAddress | Nil)
Source
from_cloudflare(host : String, port : Int32, resolver : Resolver) : Tuple(UInt64, Array(Socket::IPAddress)) | Nil
Source
get_tcp_socket!(host : String, port : Int32, resolver : Resolver, connect_timeout : Int | Float | Nil = nil) : ::TCPSocket
Source
get_udp_socket!(host : String, port : Int32, resolver : Resolver, connect_timeout : Int | Float | Nil = nil) : UDPSocket
Source
getaddrinfo!(host : String, port : Int32, resolver : Resolver, try_connect : Bool = true) : Tuple(Fetch, Socket::IPAddress)
Source
getaddrinfo_all(host : String, port : Int32, resolver : Resolver, &block : Tuple(Fetch, Array(Socket::IPAddress)) -> )
Source
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 -> )
Source
getaddrinfo_all(host : String, port : Int32, resolver : Resolver) : FetchList
Source
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
Source
getaddrinfo_all(host : String, port : Int32, ip_cache : Cache::IPAddress | Nil, dns_server : Array(Server), &block : FetchList -> )
Source
getaddrinfo_all(host : String, port : Int32, ip_cache : Cache::IPAddress | Nil, dns_server : Array(Server)) : FetchList
Source

Instance methods

cache_expires?(host, flags : Array(RecordFlag))
Source
cloudflare?(host : String, port : Int32 | Nil = 0) : Option::Cloudflare | Nil
Source
coffee
Source
coffee=(value : Coffee::Scanner)
Source
dnsServers
Source
dnsServers=(dnsServers : Array(Server))
Source
fetch_cache(host, flags : Array(RecordFlag), resolve_response : ResolveResponse)
Source
fetch_record_cache(host, flag : RecordFlag)
Source
get_socket_protocol(socket : IO) : Protocol | Nil
Source
getaddrinfoPendingList
Source
getaddrinfoPendingList=(getaddrinfoPendingList : PendingList)
Source
ip_cache
Source
ip_cache=(value : Cache::IPAddress)
Source
mapping?(host : String, port : Int32 | Nil = 0) : Option::Mapping | Nil
Source
mapping_local?(item, port : Int32 = 0) : Array(Socket::IPAddress) | Nil
Source
mapping_to?(item, port : Int32 = 0) : Tuple(String, Int32) | Nil
Source
mismatch_retry
Source
mutex
Source
mutex=(mutex : Mutex)
Source
option
Source
option=(option : Option)
Source
pending_getaddrinfo_fetch(host : String, port : Int32, resolver : Resolver) : Nil
Source
query_record!(specify : Array(Server) | Nil, host : String, flag : RecordFlag, strict_answer : Bool = false) : Array(Packet) | Nil
Source
query_record!(socket : IO | Nil, host : String, flag : RecordFlag, strict_answer : Bool = false) : Packet | Nil
Source
record_cache
Source
record_cache=(value : Cache::Record)
Source
resolve(host, flag : RecordFlag, strict_answer : Bool = false, &callback : ResolveResponse -> )
Source
resolve(host, flags : Array(RecordFlag), strict_answer : Bool = false, &callback : ResolveResponse -> )
Source
resolve_task(specify : Array(Server) | Nil, host : String, task : ResolveTask)
Source
set_record_cache(host, packets : Array(Packet), flag : RecordFlag)
Source
set_record_cache(host, packet : Packet, flag : RecordFlag)
Source
specify?(host : String, port : Int32 | Nil = 0) : Option::Specify | Nil
Source
tasks
Source
tasks=(tasks : Hash(String, Hash(String, ResolveTask)))
Source
to_ip_address(host : String)
Source

Nested types