### Method

# Gio Resolver lookup_service_async

since: 2.22

#### Declaration

    void
    g_resolver_lookup_service_async (
      GResolver* resolver,
      const gchar* service,
      const gchar* protocol,
      const gchar* domain,
      GCancellable* cancellable,
      GAsyncReadyCallback callback,
      gpointer user_data
    )

#### Description

Begins asynchronously performing a DNS SRV lookup for the given `service` and `protocol` in the given `domain`, and eventually calls `callback`, which must call `g_resolver_lookup_service_finish()` to get the final result. See `g_resolver_lookup_service()` for more details.

Available since: 2.22

#### Parameters

`service`

  Type: `const gchar*`

  The service type to look up (eg, “ldap”)

  The data is owned by the caller of the method.
  The value is a NUL terminated UTF-8 string.

`protocol`

  Type: `const gchar*`

  The networking protocol to use for `service` (eg, “tcp”)

  The data is owned by the caller of the method.
  The value is a NUL terminated UTF-8 string.

`domain`

  Type: `const gchar*`

  The DNS domain to look up the service in.

  The data is owned by the caller of the method.
  The value is a NUL terminated UTF-8 string.

`cancellable`

  Type: `GCancellable`

  A `GCancellable`, or `NULL`.

  The argument can be `NULL`.
  The data is owned by the caller of the method.

`callback`

  Type: `GAsyncReadyCallback`

  Callback to call after resolution completes.

  The argument can be `NULL`.

`user_data`

  Type: `gpointer`

  Data for `callback`.

  The argument can be `NULL`.
  The data is owned by the caller of the method.