Perform SASL negotiation in a synchronous mode (blocking the caller until process finish). This function does the same like vortex_sasl_start_auth but in a blocking manner. Check documentation this this function at vortex_sasl_start_auth. Here is an example: // some variable declaration for SASL status VortexStatus status; char * status_message; // set required properties vortex_sasl_set_propertie (connection, VORTEX_SASL_AUTH_ID, "bob", NULL); vortex_sasl_set_propertie (connection, VORTEX_SASL_PASSWORD, "secret", NULL); // begin SASL negotiation vortex_sasl_start_auth_sync (connection, VORTEX_SASL_CRAM_MD5, &status, &status_message); // write out error switch (status) { case VortexOk: printf ("OK: message reported: %s\n", status_message); break; case VortexError: printf ("FAIL: message reported: %s\n", status_message); break; } See Using SASL at client side for a detailed explanation about SASL support inside Vortex for the client side.
|