Opens an LDAP connection, optionally upgrading to TLS and binding.
When LdapConnectOptions.tls is 'implicit' the socket is TLS from the first byte;
when 'starttls' the StartTLS extended operation runs and the socket is upgraded before any
bind. If LdapConnectOptions.bindDN is set, a simple bind is performed before the
session is returned.
Opens an LDAP connection, optionally upgrading to TLS and binding.
When LdapConnectOptions.tls is
'implicit'the socket is TLS from the first byte; when'starttls'the StartTLS extended operation runs and the socket is upgraded before any bind. If LdapConnectOptions.bindDN is set, a simple bind is performed before the session is returned.