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 g_network_address_new() or g_network_address_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

the new #GNetworkAddress, or %NULL on error

Throws

GException on failure.

Meta

Since

2.26