GNOME Bugzilla – Bug 791334
gbinding.c:898: The target object of type GNetworkAddress has no property called 'proxy-resolver'
Last modified: 2018-01-03 08:43:25 UTC
Despite the documentation of GSocketConnectable::proxy-resolver property: https://developer.gnome.org/gio/stable/GSocketConnectable.html this property is not available, even it's claimed to be there since 2.36. I thought that it was meant to be able to use proxy resolver when using GNetworkMonitor to determine whether the server is reachable. Looking more closely into it, the documentation is partially wrong and causing confusion. The whole section is called GSocketConnectable, and it shows some properties just like any other object/interface, but the "proxy-resolver" properly is listed for GProxyAddressEnumerator, not for GSocketConnectable, which is not obvious. Thus, please, correct the documentation. By the way, how am I supposed to use this GProxyAddressEnumerator::proxy-resolver in connection with g_network_monitor_can_reach(), which I usually get from g_network_monitor_get_default(), but even if not, then it can be used by multiple addresses (and eventually also multiple threads) at the same time, where different proxies (or none) might be needed for those different addresses?
Yeah, it looks like glib/docs/reference/gio/gio-sections.txt is mixing together the GSocketConnectable and GProxyAddressEnumerator docs for some reason... > By the way, how am I supposed to use this > GProxyAddressEnumerator::proxy-resolver in connection with > g_network_monitor_can_reach() There doesn't seem to be a way to use a proxy resolver other than the default one with GNetworkMonitor.
Created attachment 365423 [details] [review] docs: Split GSocketConnectable/GProxyAddressEnumerator documentation Putting them in the same section causes gtk-doc to mix their properties together in a single listing, which is confusing. Since having them in a single section doesn’t really add anything, split them out to one class per section. Signed-off-by: Philip Withnall <withnall@endlessm.com>
(In reply to Dan Winship from comment #1) > > By the way, how am I supposed to use this > > GProxyAddressEnumerator::proxy-resolver in connection with > > g_network_monitor_can_reach() > > There doesn't seem to be a way to use a proxy resolver other than the > default one with GNetworkMonitor. Looks like we might need to add a GNetworkMonitorBase:proxy-resolver property, which sets that proxy resolver on the proxy enumerator coming from g_socket_connectable_proxy_enumerate() in can_reach().
Comment on attachment 365423 [details] [review] docs: Split GSocketConnectable/GProxyAddressEnumerator documentation looks right to me but I didn't actually check that it fixes things
(In reply to Dan Winship from comment #4) > Comment on attachment 365423 [details] [review] [review] > docs: Split GSocketConnectable/GProxyAddressEnumerator documentation > > looks right to me but I didn't actually check that it fixes things I just did. It does.
Pushed to master, and I’ll backport to 2.54 shortly. Milan, if you want to come up with a patch to fix your other issue about custom proxy resolvers not being usable with GNetworkMonitor, please file a separate bug report and attach it there (let's keep one bug report per issue). I'll be happy to review it. Thanks. Attachment 365423 [details] pushed as 12fa92d - docs: Split GSocketConnectable/GProxyAddressEnumerator documentation
Pushed to glib-2-54 as: 08a813893 (HEAD -> glib-2-54, origin/glib-2-54) docs: Split GSocketConnectable/GProxyAddressEnumerator documentation