gnetworkaddress: Add g_network_address_new_loopback() constructor
authorDan Winship <danw@gnome.org>
Sun, 23 Nov 2014 17:53:03 +0000 (12:53 -0500)
committerMaciej Wereski <m.wereski@partner.samsung.com>
Fri, 10 Jul 2015 09:47:42 +0000 (11:47 +0200)
commit4b962541d9293b6f63252b8d867f575e100f7993
treed462f3e8d9a9a12ce5023d51875790a66163d188
parent82276c7c7c6cff16c124b9d78c709069e482d91d
gnetworkaddress: Add g_network_address_new_loopback() constructor

This is a convenience method for creating a GNetworkAddress which is
guaranteed to return IPv4 and IPv6 loopback addresses. The program
cannot guarantee that 'localhost' will resolve to both types of
address, so programs which wish to connect to a local service over
either IPv4 or IPv6 must currently manually create an IPv4 and another
IPv6 socket, and detect which of the two are working. This new API
allows the existing GSocketConnectable machinery to be used to
automate that.

Based on a patch from Philip Withnall.

https://bugzilla.gnome.org/show_bug.cgi?id=732317
docs/reference/gio/gio-sections.txt
gio/gnetworkaddress.c
gio/gnetworkaddress.h
gio/tests/network-address.c