예제 #1
0
        /// <summary>
        /// Constructor.
        /// </summary>
        /// <param name="clientVersion">The LDAP version of client.</param>
        /// <param name="remoteAddress">Remote address to which messages will be sent.</param>
        internal AdtsLdapContext(AdtsLdapVersion clientVersion, IPEndPoint remoteAddress)
        {
            this.lockObject = new object();

            this.messageId       = DefaultMessageId;
            this.remoteAddress   = remoteAddress;
            this.isAuthenticated = false;
            this.clientVersion   = clientVersion;
            this.serverVersion   = clientVersion;
            isSicily             = false;
        }
        /// <summary>
        /// Constructor.
        /// </summary>
        /// <param name="clientVersion">The LDAP version of client.</param>
        /// <param name="remoteAddress">Remote address to which messages will be sent.</param>
        internal AdtsLdapContext(AdtsLdapVersion clientVersion, IPEndPoint remoteAddress)
        {
            this.lockObject = new object();

            this.messageId = DefaultMessageId;
            this.remoteAddress = remoteAddress;
            this.isAuthenticated = false;
            this.clientVersion = clientVersion;
            this.serverVersion = clientVersion;
            isSicily = false;
        }
예제 #3
0
        /// <summary>
        /// Constructor.
        /// </summary>
        /// <param name="ldapVersion">The LDAP version that client uses.</param>
        /// <param name="config">
        /// The transport stack configuration. Note that for ADTS-LDAP, only socket transport is supported.
        /// </param>
        /// <exception cref="StackException">Thrown when the TransportConfig is not SocketTransportConfig</exception>
        /// <exception cref="ArgumentException">
        /// Thrown when the stack transport type is neither TCP nor UDP.
        /// </exception>
        public AdtsLdapClient(AdtsLdapVersion ldapVersion, TransportConfig config)
        {
            this.ldapVersion = ldapVersion;
            this.config      = config;

            if (ldapVersion == AdtsLdapVersion.V2)
            {
                this.encoder = new AdtsLdapV2Encoder();
            }
            else
            {
                this.encoder = new AdtsLdapV3Encoder();
            }
        }
        /// <summary>
        /// Constructor.
        /// </summary>
        /// <param name="ldapVersion">The LDAP version that client uses.</param>
        /// <param name="config">
        /// The transport stack configuration. Note that for ADTS-LDAP, only socket transport is supported.
        /// </param>
        /// <exception cref="StackException">Thrown when the TransportConfig is not SocketTransportConfig</exception>
        /// <exception cref="ArgumentException">
        /// Thrown when the stack transport type is neither TCP nor UDP.
        /// </exception>
        public AdtsLdapClient(AdtsLdapVersion ldapVersion, TransportConfig config)
        {
            this.ldapVersion = ldapVersion;
            this.config = config;

            if (ldapVersion == AdtsLdapVersion.V2)
            {
                this.encoder = new AdtsLdapV2Encoder();
            }
            else
            {
                this.encoder = new AdtsLdapV3Encoder();
            }
        }