mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-07-25 19:37:52 +02:00
GResolver wrappers: GNetworkAddress, GNetworkService, GSocketConnectable
Higher-level wrappers around GResolver. GSocketConnectable provides an interface for synchronously or asynchronously iterating multiple socket addresses, with GNetworkAddress and GNetworkService providing interfaces based on hostname and SRV record resolution. Part of #548466.
This commit is contained in:
@@ -52,6 +52,10 @@
|
||||
* resolution, for hostnames (g_resolver_lookup_by_address(),
|
||||
* g_resolver_lookup_by_name() and their async variants) and SRV
|
||||
* (service) records (g_resolver_lookup_service()).
|
||||
*
|
||||
* #GNetworkAddress and #GNetworkService provide wrappers around
|
||||
* #GResolver functionality that also implement #GSocketConnectable,
|
||||
* making it easy to connect to a remote host/service.
|
||||
**/
|
||||
|
||||
/**
|
||||
@@ -169,6 +173,10 @@ g_resolver_set_default (GResolver *resolver)
|
||||
* operation, in which case @error (if non-%NULL) will be set to
|
||||
* %G_IO_ERROR_CANCELLED.
|
||||
*
|
||||
* If you are planning to connect to a socket on the resolved IP
|
||||
* address, it may be easier to create a #GNetworkAddress and use its
|
||||
* #GSocketConnectable interface.
|
||||
*
|
||||
* Return value: a #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.)
|
||||
@@ -470,6 +478,10 @@ g_resolver_get_service_rrname (const char *service,
|
||||
* operation, in which case @error (if non-%NULL) will be set to
|
||||
* %G_IO_ERROR_CANCELLED.
|
||||
*
|
||||
* If you are planning to connect to the service, it is usually easier
|
||||
* to create a #GNetworkService and use its #GSocketConnectable
|
||||
* interface.
|
||||
*
|
||||
* Return value: a #GList of #GSrvTarget, or %NULL on error. You must
|
||||
* free each of the targets and the list when you are done with it.
|
||||
* (You can use g_resolver_free_targets() to do this.)
|
||||
|
Reference in New Issue
Block a user