### Method

# Gio SrvTarget get_hostname

since: 2.22

#### Declaration

    const gchar*
    g_srv_target_get_hostname (
      GSrvTarget* target
    )

#### Description

Gets `target`‘s hostname (in ASCII form; if you are going to present this to the user, you should use `g_hostname_is_ascii_encoded()` to check if it contains encoded Unicode segments, and use `g_hostname_to_unicode()` to convert it if it does.)

Available since: 2.22

#### Return value

Type: `const gchar*`

`target`‘s hostname.

The data is owned by the instance.
The value is a NUL terminated UTF-8 string.