gResolverLookupService {RGtk2} | R Documentation

## gResolverLookupService

### Description

Synchronously performs a DNS SRV lookup for the given `service` and `protocol` in the given `domain` and returns a list of `GSrvTarget`. `domain` may be an ASCII-only or UTF-8 hostname. Note also that the `service` and `protocol` arguments do not include the leading underscore that appears in the actual DNS entry.

### Usage

    gResolverLookupService(object, service, protocol, domain, cancellable = NULL,
        .errwarn = TRUE)

### Arguments

``object`` | a `GResolver`
``service`` | the service type to look up (eg, "ldap")
``protocol`` | the networking protocol to use for `service` (eg, "tcp")
``domain`` | the DNS domain to look up the service in
``cancellable`` | a `GCancellable`, or `NULL`
`.errwarn` | Whether to issue a warning on error or fail silently

### Details

On success, `gResolverLookupService` will return a `list` of `GSrvTarget`, sorted in order of preference. (That is, you should attempt to connect to the first target first, then the second if the first fails, etc.)

If the DNS resolution fails, `error` (if non-`NULL`) will be set to a value from `GResolverError`.

If `cancellable` is non-`NULL`, it can be used to cancel the 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. Since 2.22

### Value

A list containing the following elements:

`retval` | [list] a `list` 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 `gResolverFreeTargets` to do this.)
``error`` | return location for a `GError`, or `NULL`

### Author(s)

Derived by RGtkGen from GTK+ documentation

[Package RGtk2 version 2.20.36.3 Index]