Beispiel #1
0
 public void DisposeSocketPool()
 {
     using (var pool = TcpKerberosTransport.CreateSocketPool())
     {
         Assert.IsNotNull(pool);
     }
 }
Beispiel #2
0
        public async Task Request_WithScavenge()
        {
            var port = NextPort();

            var listener = new TcpListener(IPAddress.Loopback, port);

            try
            {
                listener.Start();

                using (var pool = TcpKerberosTransport.CreateSocketPool())
                {
                    for (var i = 0; i < pool.MaxPoolSize + 1; i++)
                    {
                        var req = await pool.Request(new DnsRecord { Target = "127.0.0.1", Port = port }, TimeSpan.FromMilliseconds(500));

                        req.Dispose();
                    }
                }
            }
            finally
            {
                listener.Stop();
            }
        }
Beispiel #3
0
        public void CreateSocketPool()
        {
            var pool = TcpKerberosTransport.CreateSocketPool();

            Assert.IsNotNull(pool);
        }