lookup_by_name_with_flags


Description:

[ Version ( since = "2.60" ) ]
public virtual List<InetAddress> lookup_by_name_with_flags (string hostname, ResolverNameLookupFlags flags, Cancellable? cancellable = null) throws Error

This differs from lookup_by_name in that you can modify the lookup behavior with flags.

For example this can be used to limit results with g_resolver_name_lookup_flags_ipv4_only.

Parameters:

this

a Resolver

hostname

the hostname to look up

flags

extra ResolverNameLookupFlags for the lookup

cancellable

a Cancellable, or null

Returns:

a non-empty List of InetAddress, 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.)