On Tue, 2012-04-03 at 10:40 -0400, Matthew Barnes wrote: > g_network_monitor_can_reach() takes a GSocketConnectable -- which is > just an interface that's implemented by several concrete classes like > GNetworkAddress (based on host name and port number) and GNetworkService > (based on SRV records), so I assume service will be taken into account > when possible in determining the boolean result that would feed into > EBackend's "online" state.
Seems I'm assuming too much. Dan Winship advises me that g_network_monitor_can_reach() merely checks if there's a route to the host, but doesn't actually connect. Would it make sense to split the "online" state into two flags, perhaps "host-reachable" and "service-available"? The latter would reflect the result of actually trying to connect to the service to see if something answers, obviously only attempted if "host-reachable" is set. These could both be class methods in EBackend so backends can tailor them as needed. For example, an HTTP server may well respond alright, but with a "501 Service Unavailable" which should interpreted as FALSE. Would this distinction be useful to backends? Matt _______________________________________________ evolution-hackers mailing list [email protected] To change your list options or unsubscribe, visit ... http://mail.gnome.org/mailman/listinfo/evolution-hackers
