split_network


Description:

[ Version ( since = "2.66" ) ]
public static bool split_network (string uri_string, UriFlags flags, out string? scheme, out string? host, out int port) throws UriError

Parses uri_string (which must be an [absolute URI](relative-and-absolute-uris)) according to flags, and returns the pieces relevant to connecting to a host.

See the documentation for 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.

Parameters:

uri_string

a string containing an absolute URI

flags

flags for parsing uri_string

scheme

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

host

on return, contains the host, or null

port

on return, contains the port, or `-1`

Returns:

true if uri_string parsed successfully, false on error.