Table of Contents | Previous | Next | Index

Netscape Directory SDK 3.0 for C Programmer’s Guide
     Chapter 18 Functions

ldap_result()

ldap_result() waits for and returns the result of an LDAP operation initiated by one of the asynchronous LDAP API functions (for example, ldap_search(), ldap_add(), ldap_modify()).

To identify the operation that you want to check, pass the message ID of the operation. (Asynchronous functions return a unique message ID that you can pass to the ldap_result() function.)

For more information, see "Getting the Server Response" on page 84.

Syntax

#include <ldap.h>
int ldap_result( LDAP *ld, int msgid, int all,
   struct timeval *timeout, LDAPMessage **result );

Parameters

This function has the following parameters:

ld

Connection handle, which is a pointer to an LDAP structure containing information about the connection to the LDAP server.

msgid

Message ID of the operation for which you want the results. To check any operation, pass LDAP_RES_ANY as the value of this parameter.

all

Specifies how the results of a search are returned. This parameter can have the following values:

timeout

Specifies a maximum interval to wait for the selection to complete. If timeout is a NULL pointer, the select blocks indefinitely. To effect a poll, the timeout parameter should be a non-NULL pointer, pointing to a zero-valued timeval structure.

result

Result of the operation. To interpret the results, pass this to the LDAP parsing routines, such as ldap_result2error(), ldap_parse_result(), and ldap_first_entry().

Returns

One of the following values:

Example

See the examples in the following sections:

See Also

ldap_add_ext(), ldap_compare_ext(), ldap_delete_ext(), ldap_modify_ext(), ldap_rename(), ldap_simple_bind(), ldap_url_search().


Table of Contents | Previous | Next | Index

Last Updated: 10/01/98 17:06:23