class DNS::Resolver
- DNS::Resolver
- Reference
- Object
Defined in:
dns/resolver.crConstructors
Class Method Summary
-
.query(name, record_types : RecordType, record_class = RecordClass::Internet) : Message
Creates a temporary resolver, sends a query and returns the result.
Instance Method Summary
-
#close
Closes the socket.
-
#query(name, record_type : RecordType, record_class = RecordClass::Internet) : Message
Sends a query.
-
#send(message : Message) : Message
Sends a message and retrieves the result.
Constructor Detail
Class Method Detail
Creates a temporary resolver, sends a query and returns the result. If you are sending more than one query at a time, create your own Resolver instance instead.
DNS::Resolver.query "example.com", RecordType::AAAA
Instance Method Detail
Sends a query.
resolver = DNS::Resolver.new
pp resolver.query "example.com", RecordType::AAAA
resolver.close