Table of Contents
|
LDAP4D at A Dog And His Boy |
Communication Methods |
|
About this section... |
This section describes the methods used to do the actual communication with an LDAP server. The underlying mechanism for this is via TCP/IP plugins. Both 4D Internet Commands and Internet Toolkit are supported. |
LDAP_Open |
||||||||||||||||||||||||||
Syntax: |
result := LDAP_Open (serverName:T; port:LI; useSSL:B) |
|||||||||||||||||||||||||
Description: |
Open a connection to the specified server (IP address or DNS name) on the optional specified port optionally using SSL. |
|||||||||||||||||||||||||
Warning: |
If you are using LDAP 4D with Internet Toolkit (ITK), ITK must also be initialized using the ITK_Init command. If you are using 4D Internet Commands, it must have been initialized using the IT_MacTCPInit command. THIS method uses 0 as an error!!!! |
|||||||||||||||||||||||||
Note: |
If the port is not specified then 389 is used. If the SSL parameter is not passed then SSL is OFF. If SSL is TRUE and port = 0 then 636 is used. |
|||||||||||||||||||||||||
Params: |
|
|||||||||||||||||||||||||
Example: |
$iStreamID:=LDAP_Open("ldap.microsoft.com";389;FALSE) If ($iStreamID # 0) ALERT("The Stream that was opened has ID = "+string($iStreamID)) End If |
LDAP_Close |
||||||||||||||||
Syntax: |
result := LDAP_Close (streamReference;LI) |
|||||||||||||||
Description: |
Close the connection to server. |
|||||||||||||||
Warning: |
If you are using LDAP 4D with Internet Toolkit (ITK) ITK must also be initialized using the ITK_Init command.
|
|||||||||||||||
Note: |
|
|||||||||||||||
Params: |
|
|||||||||||||||
Example: |
$err := LDAP_Close($iStreamRef) If ($err # 0) ALERT("LDAP Close failed") End If |
LDAP_Message_Send |
||||||||||||||||||||||||||
Syntax: |
result:=LDAP_Message_Send (streamRef:T;messageID;LI;messageText:T) |
|||||||||||||||||||||||||
Description: |
Send a message to LDAP server on previously opened stream. |
|||||||||||||||||||||||||
Warning: |
If you are using LDAP 4D with Internet Toolkit (ITK) ITK must also be initialized using the ITK_Init command.
|
|||||||||||||||||||||||||
Note: |
|
|||||||||||||||||||||||||
Params: |
|
|||||||||||||||||||||||||
Example: |
$iErr:=LDAP_Message_Send($iStreamRef;$iMessageID;LDAP_Message(2;LDAP_UnbindRequest)) |
LDAP_Response_Parse |
|||||||||||||||||||||
Syntax: |
result:=LDAP_Response_Parse (streamRef:T{;timeout:LI}) |
||||||||||||||||||||
Description: |
Receive an expected response from an LDAP server on previously opened stream. |
||||||||||||||||||||
Warning: |
|
||||||||||||||||||||
Note: |
This method sets a number of variables if successful. See Response Methods for detail. |
||||||||||||||||||||
Params: |
|
||||||||||||||||||||
Example: |
$iErr:=LDAP_Response_Parse($iStreamRef) |