ThrowError() private method

private ThrowError ( ) : void
return void
示例#1
0
 public void Commit()
 {
     lock (client) {
         if (avahi_entry_group_commit(handle) < 0)
         {
             client.ThrowError();
         }
     }
 }
示例#2
0
        public EntryGroup(Client client)
        {
            this.client = client;
            cb          = OnEntryGroupCallback;

            lock (client) {
                handle = avahi_entry_group_new(client.Handle, cb, IntPtr.Zero);
                if (handle == IntPtr.Zero)
                {
                    client.ThrowError();
                }
            }
        }
示例#3
0
        private void Start()
        {
            if (client.Handle == IntPtr.Zero || handle != IntPtr.Zero ||
                (addListeners.Count == 0 && removeListeners.Count == 0))
            {
                return;
            }

            lock (client) {
                handle = avahi_record_browser_new(client.Handle, iface, proto, Utility.StringToBytes(name),
                                                  (ushort)clazz, (ushort)type, flags, cb, IntPtr.Zero);

                if (handle == IntPtr.Zero)
                {
                    client.ThrowError();
                }
            }
        }
        private void Start()
        {
            if (client.Handle == IntPtr.Zero || handle != IntPtr.Zero ||
                (addListeners.Count == 0 && removeListeners.Count == 0))
            {
                return;
            }

            lock (client) {
                handle = avahi_service_type_browser_new(client.Handle, iface, (int)proto,
                                                        Utility.StringToBytes(domain), flags,
                                                        cb, IntPtr.Zero);

                if (handle == IntPtr.Zero)
                {
                    client.ThrowError();
                }
            }
        }
        private void Start()
        {
            if (client.Handle == IntPtr.Zero || handle != IntPtr.Zero ||
                (foundListeners.Count == 0 && timeoutListeners.Count == 0))
            {
                return;
            }

            lock (client) {
                handle = avahi_host_name_resolver_new(client.Handle, iface, proto,
                                                      Utility.StringToBytes(hostname), aproto, flags,
                                                      cb, IntPtr.Zero);

                if (handle == IntPtr.Zero)
                {
                    client.ThrowError();
                }
            }
        }
        private void Start()
        {
            if (client.Handle == IntPtr.Zero || handle != IntPtr.Zero ||
                (foundListeners.Count == 0 && timeoutListeners.Count == 0))
            {
                return;
            }

            IntPtr addrPtr = Utility.AddressToPtr(address);

            lock (client) {
                handle = avahi_address_resolver_new(client.Handle, iface, proto, addrPtr, flags,
                                                    cb, IntPtr.Zero);

                if (handle == IntPtr.Zero)
                {
                    client.ThrowError();
                }
            }

            Utility.Free(addrPtr);
        }
示例#7
0
        public EntryGroup(Client client)
        {
            this.client = client;
            cb = OnEntryGroupCallback;

            lock (client) {
                handle = avahi_entry_group_new (client.Handle, cb, IntPtr.Zero);
                if (handle == IntPtr.Zero)
                    client.ThrowError ();
            }
        }