public async Task CanAsyncronouslyConnectAndSendDataAndResolveAsync()
        {
            var manager         = new TorSocks5Manager(SharedFixture.TorSock5EndPoint);
            var connectionTasks = new List <Task <TorSocks5Client> >();

            try
            {
                connectionTasks.Add(manager.EstablishTcpConnectionAsync("api.ipify.org", 80));
                connectionTasks.Add(manager.EstablishTcpConnectionAsync("bitcoin.org", 80));
                connectionTasks.Add(manager.EstablishTcpConnectionAsync("api.ipify.org", 80));
                connectionTasks.Add(manager.EstablishTcpConnectionAsync("api.ipify.org", 80));
                connectionTasks.Add(manager.EstablishTcpConnectionAsync("pets.com", 80));
                connectionTasks.Add(manager.EstablishTcpConnectionAsync("google.com", 443, true));

                var t1 = manager.ReverseResolveAsync(IPAddress.Parse("192.64.147.228"), false);
                var t2 = manager.ResolveAsync("google.com", false);

                var ipTasks  = new HashSet <Task <byte[]> >();
                var sendBuff = Encoding.UTF8.GetBytes("GET / HTTP/1.1\r\nHost:api.ipify.org\r\n\r\n");
                for (int i = 0; i < connectionTasks.Count; i++)
                {
                    if (i == 0 || i == 2 || i == 3)
                    {
                        var c = await connectionTasks[i];
                        ipTasks.Add(c.SendAsync(sendBuff));
                    }
                }

                var bitcoinClient        = await connectionTasks[1];
                var bitcoinErrorResponse = await bitcoinClient.SendAsync(sendBuff);

                string bitcoinErrorResponseString = Encoding.ASCII.GetString(bitcoinErrorResponse);
                Assert.Contains("moved permanently", bitcoinErrorResponseString, StringComparison.OrdinalIgnoreCase);


                foreach (var ipTask in ipTasks)
                {
                    byte[] response       = await ipTask;
                    string responseString = Encoding.ASCII.GetString(response);
                    IPAddress.Parse(responseString.Split("\n").Last());
                }

                await Task.WhenAll(t1, t2);

                Assert.NotNull(await t1);
                Assert.NotNull(await t2);
            }
            finally
            {
                foreach (var task in connectionTasks)
                {
                    var client = await task;
                    client?.Dispose();
                }
            }
        }
        public async Task CanResolveAsync()
        {
            var torManager = new TorSocks5Manager(SharedFixture.TorSock5EndPoint);
            var t1         = await torManager.ReverseResolveAsync(IPAddress.Parse("192.64.147.228"), false);

            var t2 = await torManager.ResolveAsync("google.com", false);

            var clearnetManager = new TorSocks5Manager(null);
            var c1 = await clearnetManager.ReverseResolveAsync(IPAddress.Parse("192.64.147.228"), false);

            var c2 = await clearnetManager.ResolveAsync("google.com", false);

            Assert.Equal(c1, t1);
        }