Uri.splitNetwork

Parses uri_string (which must be an absolute URI) according to flags, and returns the pieces relevant to connecting to a host. See the documentation for glib.uri.Uri.split for more details; this is mostly a wrapper around that function with simpler arguments. However, it will return an error if uri_string is a relative URI, or does not contain a hostname component.

class Uri
static
bool
splitNetwork
(
string uriString
,,
out string scheme
,
out string host
,
out int port
)

Parameters

uriString string

a string containing an absolute URI

flags glib.types.UriFlags

flags for parsing uri_string

scheme string

on return, contains the scheme (converted to lowercase), or null

host string

on return, contains the host, or null

port int

on return, contains the port, or -1

Return Value

Type: bool

true if uri_string parsed successfully, false on error.