Package org.gnome.gio

Class Resolver

java.lang.Object
All Implemented Interfaces:
Proxy
Direct Known Subclasses:
Resolver.ResolverImpl, ThreadedResolver

@Generated("io.github.jwharm.JavaGI") public abstract class Resolver extends GObject
The object that handles DNS resolution. Use getDefault() to get the default resolver.

GResolver provides cancellable synchronous and asynchronous DNS resolution, for hostnames (lookupByAddress(org.gnome.gio.InetAddress, org.gnome.gio.Cancellable), lookupByName(java.lang.String, org.gnome.gio.Cancellable) and their async variants) and SRV (service) records (lookupService(java.lang.String, java.lang.String, java.lang.String, org.gnome.gio.Cancellable)).

NetworkAddress and NetworkService provide wrappers around GResolver functionality that also implement SocketConnectable, making it easy to connect to a remote host/service.

The default resolver (see getDefault()) has a timeout of 30s set on it since GLib 2.78. Earlier versions of GLib did not support resolver timeouts.

This is an abstract type; subclasses of it implement different resolvers for different platforms and situations.