Gio.SrvTarget.new

function new(hostname: String, port: Number(guint16), priority: Number(guint16), weight: Number(guint16)): Gio.SrvTarget {
    // Gjs wrapper for g_srv_target_new()
}
  

Creates a new Gio.SrvTarget with the given parameters.

You should not need to use this; normally #GSrvTargets are created by Gio.Resolver.

Since 2.22

hostname

the host that the service is running on

port

the port that the service is running on

priority

the target's priority

weight

the target's weight

Returns

a new Gio.SrvTarget.