Mono.Zeroconf.Providers.Bonjour.ServiceRef.Process C# (CSharp) Method

Process() public method

public Process ( ) : void
return void
        public void Process()
        {
            while(ProcessSingle() == ServiceError.NoError);
        }

Usage Example

示例#1
0
        public void ProcessRegister()
        {
            ushort txt_rec_length = 0;

            byte [] txt_rec = null;

            if (TxtRecord != null)
            {
                txt_rec_length = ((TxtRecord)TxtRecord.BaseRecord).RawLength;
                txt_rec        = new byte[txt_rec_length];
                Marshal.Copy(((TxtRecord)TxtRecord.BaseRecord).RawBytes, txt_rec, 0, txt_rec_length);
            }

            _self = GCHandle.Alloc(this);
            ServiceError error = Native.DNSServiceRegister(out sd_ref,
                                                           auto_rename ? ServiceFlags.None : ServiceFlags.NoAutoRename, InterfaceIndex,
                                                           Name, RegType, ReplyDomain, HostTarget, (ushort)IPAddress.HostToNetworkOrder((short)port), txt_rec_length, txt_rec,
                                                           register_reply_handler, GCHandle.ToIntPtr(_self));

            if (error != ServiceError.NoError)
            {
                throw new ServiceErrorException(error);
            }

            sd_ref.Process();
        }
All Usage Examples Of Mono.Zeroconf.Providers.Bonjour.ServiceRef::Process