Show Table of Contents
5.3. Sending Data to the Client
Sometimes you might need to communicate various information directly to the client. This could occur in the following situations:
- If you need to send a result code to the client (for example, to report an error or a successful result to an LDAP operation), call the slapi_send_ldap_result() function.
- If you are fulfilling a search request and need to send matching entries to the client, call the slapi_send_ldap_search_entry() function for each entry.
- To refer the LDAP request to a different LDAP server, call the slapi_send_ldap_referral() function.
For example, the following statement sends an LDAP_SUCCESS status code back to the client:
slapi_send_ldap_result( pb, LDAP_SUCCESS, NULL, "The operation was processed successfully.\n", 0, NULL );
Important
Ensure that you send only one result per operation to the client.

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.