Gio.SrvTarget.prototype.get_hostname

function get_hostname(): String {
    // Gjs wrapper for g_srv_target_get_hostname()
}
  

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

Since 2.22

Returns

target's hostname