/// <summary>
 ///
 /// </summary>
 /// <param name="message"></param>
 /// <returns></returns>
 private void Broadcast(byte[] message)
 {
     _ = Task.Factory.StartNew(async() =>
     {
         var members = await membershipServiceClient.GetMembersAsync().ConfigureAwait(false);
         foreach (var member in members)
         {
             _ = Task.Factory.StartNew(async() =>
             {
                 var uri = new Uri(new Uri(member.Endpoint), "message");
                 _       = await torClient.PostAsJsonAsync(uri, message);
             });
         }
     });
 }
        /// <summary>
        ///
        /// </summary>
        /// <returns></returns>
        public async Task <IEnumerable <string> > GetMembers()
        {
            var members = Enumerable.Empty <string>();

            try
            {
                members = (await membershipServiceClient.GetMembersAsync()).Select(x => x.Endpoint);
            }
            catch (Exception ex)
            {
                logger.LogError($"<<< HttpService.GetMembers >>>: {ex.ToString()}");
            }

            return(members);
        }
        public async Task BroadcastMessageAsync(object message, Uri route)
        {
            var members = await _membershipServiceClient.GetMembersAsync().ConfigureAwait(false);

            foreach (var member in members)
            {
                _ = Task.Factory.StartNew(async() =>
                {
                    var uri = new Uri(new Uri(member.Endpoint), route);

                    await _torClient.PostAsync(uri,
                                               new StringContent(JsonConvert.SerializeObject(message),
                                                                 Encoding.UTF8, "application/json"),
                                               new System.Threading.CancellationToken());
                });
            }
        }