public async Task <IOperationToken> ResolveAsync(string instanceName, string serviceType, string domain, uint interfaceIndex = 0, object context = null)
        {
            await CheckConnectionAsync();

            var op = new ResolveOperation(instanceName, serviceType, domain, interfaceIndex, context);

            op.ResolveEvent += (s, e) => ResolveEvent?.Invoke(s, e);

            await _connection.AddAndExecuteSubordinate(op);

            return(op.Token);
        }
        internal override void ProcessReply(CallbackMessage message, bool moreComing)
        {
            if (message is ResolveCallbackMessage rcm)
            {
                IEnumerable <DnssdTxtRecord> records = null;
                if (rcm.Payload.TxtRecord != null)
                {
                    var trb = new TxtRecordBuilder();
                    trb.Parse(rcm.Payload.TxtRecord, 0);
                    records = trb.TxtRecords;
                }

                ResolveEvent?.Invoke(Token, new ResolveEventArgs(rcm.Payload.FullName, rcm.Payload.HostName, rcm.Payload.Port, rcm.Payload.InterfaceIndex, records, moreComing));
            }
        }