1 .TH LDAP_OPEN 3 "RELEASEDATE" "OpenLDAP LDVERSION"
3 .\" Copyright 1998-2013 The OpenLDAP Foundation All Rights Reserved.
4 .\" Copying restrictions apply. See COPYRIGHT/LICENSE.
6 ldap_dup, ldap_destroy, \- Duplicate and destroy LDAP session handles
8 OpenLDAP LDAP (libldap, \-lldap)
30 duplicates an existing LDAP
33 The new session handle may be used concurrently with the
34 original session handle.
35 In a threaded environment, different threads may execute concurrent
36 requests on the same connection/session without fear of contamination.
37 Each session handle manages its own private error results.
40 destroys an existing session handle.
46 functions are used in conjunction with a "thread safe" version
50 to enable operation thread safe API calls, so that a single session
51 may be simultaneously used across multiple threads with consistent
54 When a session is created through the use of one of the session creation
58 .BR ldap_initialize (3)
63 session handle is returned to the application.
64 The session handle may be shared amongst threads, however the
65 error codes are unique to a session handle.
66 Multiple threads performing different operations using the same
67 session handle will result in inconsistent error codes and
70 To prevent this confusion,
72 is used duplicate an existing session handle so that multiple threads
73 can share the session, and maintain consistent error information
76 The message queues for a session are shared between sibling session handles.
77 Results of operations on a sibling session handles are accessible
78 to all the sibling session handles.
79 Applications desiring results associated with a specific operation
80 should provide the appropriate msgid to
82 Applications should avoid calling
86 as that may "steal" and return results in the calling thread
87 that another operation in a different thread, using a
88 different session handle, may require to complete.
92 is called on a session handle with siblings, all the
93 siblings become invalid.
95 Siblings must be destroyed using
97 Session handle resources associated with the original
99 will be freed when the last session handle is destroyed or when
101 is called, if no other session handles currently exist.
107 should be set appropriately.
109 will directly return the LDAP code associated to the error (or
113 should be set as well whenever appropriate.
117 .BR ldap_initialize (3),
118 .BR ldap_init_fd (3),
121 This work is based on the previously proposed
122 .B LDAP C API Concurrency Extensions
124 .BR ( draft-zeilenga-ldap-c-api-concurrency-00.txt )