NetworkAddress.parseUri

Creates a new #GSocketConnectable for connecting to the given uri. May fail and return null in case parsing uri fails.

Using this rather than gio.network_address.NetworkAddress.new_ or gio.network_address.NetworkAddress.parse allows #GSocketClient to determine when to use application-specific proxy protocols.

class NetworkAddress
static
parseUri
(
string uri
,)

Parameters

uri string

the hostname and optionally a port

defaultPort ushort

The default port if none is found in the URI

Return Value

Type: gio.network_address.NetworkAddress

the new #GNetworkAddress, or null on error