parse_uri


Description:

public static SocketConnectable parse_uri (string uri, uint16 default_port) throws Error

Creates a new SocketConnectable for connecting to the given uri.

May fail and return null in case parsing uri fails.

Using this rather than NetworkAddress or parse allows SocketClient to determine when to use application-specific proxy protocols.

Parameters:

uri

the hostname and optionally a port

default_port

The default port if none is found in the URI

Returns:

the new NetworkAddress, or null on error