Static Methoddnsclient 2.4.3DNSClient
connectTCP(on:config:)
Connect to the dns server using TCP and return a future with the client.
DNSClient+Connect.swift:146static func connectTCP(on group: EventLoopGroup, config: [SocketAddress]) -> EventLoopFuture<DNSClient>
Parameters
Returns
Future with the NioDNS client
Other members in extension
Type members
init(channel: Channel, dnsServerAddress: SocketAddress, context: DNSClientContext
) Create a new
DNSClient
that will send queries to the specified address using your ownChannel
.static func connect(on: EventLoopGroup
) -> EventLoopFuture<DNSClient> Connect to the dns server
static func connect(on: EventLoopGroup, config: [SocketAddress]
) -> EventLoopFuture<DNSClient> Connect to the dns server and return a future with the client. This method will use UDP.
static func connect(on: EventLoopGroup, host: String
) -> EventLoopFuture<DNSClient> Connect to the dns server
static func connectMulticast(on: EventLoopGroup
) -> EventLoopFuture<DNSClient> Creates a multicast DNS client. This client will join the multicast group and listen for responses. It will also send queries to the multicast group.
static func connectTCP(on: EventLoopGroup
) -> EventLoopFuture<DNSClient> Connect to the dns server using TCP
static func connectTCP(on: EventLoopGroup, host: String
) -> EventLoopFuture<DNSClient> Connect to the dns server using TCP
static func initializeChannel(Channel, context: DNSClientContext, asEnvelopeTo: SocketAddress?
) -> EventLoopFuture<Void> Set up the UDP channel to use the DNS protocol.
Instance members
func cancelQueries(
) Cancel all queries that are currently running. This will fail all futures with a
CancelError
func getSRVRecords(from: String
) -> EventLoopFuture<[ResourceRecord<SRVRecord>]> Request SRV records from a host
func initiateAAAAQuery(host: String, port: Int
) -> EventLoopFuture<[SocketAddress]> Request AAAA records
func initiateAQuery(host: String, port: Int
) -> EventLoopFuture<[SocketAddress]> Request A records
func ipv4InverseAddress(String
) -> EventLoopFuture<[ResourceRecord<PTRRecord>]> Request IPv4 inverse address (PTR records) from nameserver
func ipv6InverseAddress(String
) throws -> EventLoopFuture<[ResourceRecord<PTRRecord>]> Request IPv6 inverse address (PTR records) from nameserver
func sendQuery(forHost: String, type: DNSResourceType, additionalOptions: MessageOptions?
) -> EventLoopFuture<Message> Send a question to the dns host