Hooked proxy enumeration into GSocketClient

This functionnallity can be disabled using property enable-proxy. It
enumerates addresses using GSocketConnectable::proxy_enumerate() instead of
enumerate(). When the returned address is of type GProxyAddress (a type
based on GInetSocketAddress), it gets the proxy protocol handler using
g_proxy_get_default_for_protocol() and call connect() on it.

Reviewed-by: Dan Winship <danw@gnome.org>
This commit is contained in:
Nicolas Dufresne
2010-08-10 16:48:45 -04:00
parent ee3dbf747e
commit a6c3820f46
4 changed files with 283 additions and 33 deletions

View File

@@ -85,6 +85,9 @@ void g_socket_client_set_local_address (GSocket
guint g_socket_client_get_timeout (GSocketClient *client);
void g_socket_client_set_timeout (GSocketClient *client,
guint timeout);
gboolean g_socket_client_get_enable_proxy (GSocketClient *client);
void g_socket_client_set_enable_proxy (GSocketClient *client,
gboolean enable);
GSocketConnection * g_socket_client_connect (GSocketClient *client,
GSocketConnectable *connectable,