Ejemplo n.º 1
0
        public GLib.IOStream Connect(GLib.IOStream connection, GLib.ProxyAddress proxy_address, GLib.Cancellable cancellable)
        {
            IntPtr error   = IntPtr.Zero;
            IntPtr raw_ret = g_proxy_connect(Handle, connection == null ? IntPtr.Zero : connection.Handle, proxy_address == null ? IntPtr.Zero : proxy_address.Handle, cancellable == null ? IntPtr.Zero : cancellable.Handle, out error);

            GLib.IOStream ret = GLib.Object.GetObject(raw_ret) as GLib.IOStream;
            if (error != IntPtr.Zero)
            {
                throw new GLib.GException(error);
            }
            return(ret);
        }
Ejemplo n.º 2
0
 public void ConnectAsync(GLib.IOStream connection, GLib.ProxyAddress proxy_address, GLib.Cancellable cancellable, GLib.AsyncReadyCallback cb)
 {
     GLibSharp.AsyncReadyCallbackWrapper cb_wrapper = new GLibSharp.AsyncReadyCallbackWrapper(cb);
     cb_wrapper.PersistUntilCalled();
     g_proxy_connect_async(Handle, connection == null ? IntPtr.Zero : connection.Handle, proxy_address == null ? IntPtr.Zero : proxy_address.Handle, cancellable == null ? IntPtr.Zero : cancellable.Handle, cb_wrapper.NativeDelegate, IntPtr.Zero);
 }