gio.network_address
Module for [NetworkAddress] class
Types 3
gio.network_address.NetworkAddress provides an easy way to resolve a hostname and then attempt to connect to that host, handling the possibility of multiple IP addresses and multiple address families.
The enumeration results of resolved addresses may be cached as long as this object is kept alive which may have unexpected results if alive for too long.
See gio.socket_connectable.SocketConnectable for an example of using the connectable interface.
Methods
NetworkAddressGidBuilder builder() static nothrowGet builder for [gio.network_address.NetworkAddress] Returns: New builder objectgio.network_address.NetworkAddress newLoopback(ushort port) static nothrowCreates a new #GSocketConnectable for connecting to the local host over a loopback connection to the given port. This is intended for use in connecting to local services which may be running on IPv...gio.network_address.NetworkAddress parse(string hostAndPort, ushort defaultPort) staticCreates a new #GSocketConnectable for connecting to the given hostname and port. May fail and return null in case parsing host_and_port fails.gio.network_address.NetworkAddress parseUri(string uri, ushort defaultPort) staticCreates a new #GSocketConnectable for connecting to the given uri. May fail and return null in case parsing uri fails.string getHostname() nothrowGets addr's hostname. This might be either UTF-8 or ASCII-encoded, depending on what addr was created with. Returns: addr's hostnameclassNetworkAddressGidBuilderImpl(T) : gobject.object.ObjectWrapGidBuilderImpl!T, gio.socket_connectable.SocketConnectableGidBuilderImpl!T
Fluent builder implementation template for gio.network_address.NetworkAddress
Methods
T hostname(string propval) nothrowSet `hostname` property. Params: propval = Hostname to resolve. Returns: Builder instance for fluent chainingT port(uint propval) nothrowSet `port` property. Params: propval = Network port. Returns: Builder instance for fluent chainingT scheme(string propval) nothrowSet `scheme` property. Params: propval = URI scheme. Returns: Builder instance for fluent chainingFluent builder for gio.network_address.NetworkAddress
Methods