Class DnsResolver
java.lang.Object
org.eblocker.server.common.network.unix.DnsResolver
A simple DNS resolver that can send queries to a given host and port.
It should only be used for queries of type A and AAAA.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionResolve queries with the given name server and portResolve queries with the given name server using the standard port 53voidsetTimeout(int milliSeconds) Set timeout in milliseconds
-
Constructor Details
-
DnsResolver
@Inject public DnsResolver(io.netty.channel.nio.NioEventLoopGroup workerGroup)
-
-
Method Details
-
setTimeout
public void setTimeout(int milliSeconds) Set timeout in milliseconds- Parameters:
milliSeconds- number of milliseconds to wait for a response
-
resolve
Resolve queries with the given name server using the standard port 53 -
resolve
Resolve queries with the given name server and port- Parameters:
nameServer- name serverport- port of name serverqueries- list of queries. Only A and AAAA types are allowed.- Returns:
- list of responses. Note: the name in a response might differ from the name in the corresponding query if a CNAME is involved.
-