lookupByName
open fun lookupByName(hostname: String, cancellable: Cancellable? = null): <Error class: unknown class><<Error class: unknown class>>
Synchronously resolves @hostname to determine its associated IP address(es). @hostname may be an ASCII-only or UTF-8 hostname, or the textual form of an IP address (in which case this just becomes a wrapper around g_inet_address_new_from_string()).
On success, g_resolver_lookup_by_name() will return a non-empty #GList of #GInetAddress, sorted in order of preference and guaranteed to not contain duplicates. That is, if using the result to connect to
Return
a non-empty #GList of #GInetAddress, or null on error. You must unref each of the addresses and free the list when you are done with it. (You can use g_resolver_free_addresses() to do this.)
Since
2.22
Parameters
hostname
the hostname to look up
cancellable
a #GCancellable, or null