private LdapServer(TcpListener listener, TopObjectClass rootDse) { _listener = listener; _clients = new List <Task>(); _cts = new CancellationTokenSource(); _rootDse = rootDse; _controls = _rootDse.GetAttributes() .OfType <SupportedControlAttribute>() .Select(x => x.Oid) .ToHashSet(StringComparer.OrdinalIgnoreCase); }
protected LdapServer(IPEndPoint endPoint, TopObjectClass rootDse) : this(new TcpListener(endPoint), rootDse) { _localAddress = endPoint.Address; }
protected LdapServer(ushort port, TopObjectClass rootDse) : this(TcpListener.Create(port), rootDse) { }