Gio.NetworkAddress.parse_uri
function parse_uri(uri: String, default_port: Number(guint16)): Gio.SocketConnectable {
// Gjs wrapper for g_network_address_parse_uri()
}
Creates a new Gio.SocketConnectable for connecting to the given uri. May fail and return null in case parsing uri fails.
Using this rather than Gio.NetworkAddress.new or Gio.NetworkAddress.parse allows Gio.SocketClient to determine when to use application-specific proxy protocols.
Since 2.26
- uri
the hostname and optionally a port
- default_port
The default port if none is found in the URI
- Returns
the new Gio.NetworkAddress, or null on error