Libraries:Gtk:Gio:GProxy
Types
T
ParentT
Constants
InterfaceInfo : Std.Object.T
Nil : T
Functions
GetDefaultForProtocol(protocol @ Std.String.T) : Gtk.Gio.GProxy.T
Lookup "gio-proxy" extension point for a proxy implementation that supports specified protocol.
protocol | the proxy protocol name (e.g. http, socks, etc) |
Returns | return a T or NULL if protocol is not supported. [transfer full] |
GetType() : Gtk.GObject.Type.T
Methods
:Connect(self @ T, connection @ Gtk.Gio.GIOStream.T, proxy_address @ Gtk.Gio.GProxyAddress.T, cancellable @ Gtk.Gio.GCancellable.T, error @ Std.Object.T) : Gtk.Gio.GIOStream.T
Given connection to communicate with a proxy (eg, a Gtk.Gio.GSocketConnection.T that is connected to the proxy server), this does the necessary handshake to connect to proxy_address, and if required, wraps the Gtk.Gio.GIOStream.T to handle proxy payload.
proxy | a T |
connection | a Gtk.Gio.GIOStream.T |
proxy_address | a Gtk.Gio.GProxyAddress.T |
cancellable | a Gtk.Gio.GCancellable.T. [allow-none] |
error | return Gtk.Glib.GError.T |
Returns | a Gtk.Gio.GIOStream.T that will replace connection. This might be the same as connection, in which case a reference will be added. [transfer full] |
:Connect(_ @ ParentT, _ @ Gtk.Gio.GIOStream.T, _ @ Gtk.Gio.GProxyAddress.T, _ @ Gtk.Gio.GCancellable.T, _ @ Std.Object.T)
:ConnectAsync(self @ T, connection @ Gtk.Gio.GIOStream.T, proxy_address @ Gtk.Gio.GProxyAddress.T, cancellable @ Gtk.Gio.GCancellable.T, callback @ Std.Function.T, user_data @ Std.Address.T) : Std.Object.T
Asynchronous version of Connect.
proxy | a T |
connection | a Gtk.Gio.GIOStream.T |
proxy_address | a Gtk.Gio.GProxyAddress.T |
cancellable | a Gtk.Gio.GCancellable.T. [allow-none] |
callback | a Gtk.Gio.GAsyncReadyCallback. [scope async] |
user_data | callback data. [closure] |
:ConnectAsync(_ @ ParentT, _ @ Gtk.Gio.GIOStream.T, _ @ Gtk.Gio.GProxyAddress.T, _ @ Gtk.Gio.GCancellable.T, _ @ Std.Function.T, _ @ Std.Address.T)
:ConnectFinish(self @ T, result @ Gtk.Gio.GAsyncResult.T, error @ Std.Object.T) : Gtk.Gio.GIOStream.T
See Connect.
proxy | a T |
result | a Gtk.Gio.GAsyncResult.T |
error | return Gtk.Glib.GError.T |
Returns | a Gtk.Gio.GIOStream.T. [transfer full] |
:ConnectFinish(_ @ ParentT, _ @ Gtk.Gio.GAsyncResult.T, _ @ Std.Object.T)
:SupportsHostname(self @ T) : Std.Symbol.T
Some proxy protocols expect to be passed a hostname, which they will resolve to an IP address themselves. Others, like SOCKS4, do not allow this. This function will return FALSE if proxy is implementing such a protocol. When FALSE is returned, the caller should resolve the destination hostname first, and then pass a Gtk.Gio.GProxyAddress.T containing the stringified IP address to Connect or ConnectAsync.
A T handles connecting to a remote host via a given type of proxy server. It is implemented by the 'gio-proxy' extension point. The extensions are named after their proxy protocol name. As an example, a SOCKS5 proxy implementation can be retrieved with the name 'socks5' using the function Gtk.Gio.GIOExtensionPoint.GetExtensionByName.