For a list of protocols that support asynchronous communication, see Protocol Support for 64-bit Recording, Async, and IPv6.
The following functions enable Vuser scripts to emulate asynchronous communication:
|web_reg_async_attributes||This function registers the next action function as the beginning of an asynchronous conversation, and defines the behavior of the asynchronous communication.|
|web_stop_async||This function cancels the specified asynchronous conversation, including all its active and future tasks.|
|web_sync||This function suspends the Vuser script execution until the specified parameter is defined.|
|web_util_set_request_url||This function sets the specified string to be the request URL for the next request sent in the conversation. This is applicable only when called from a callback.|
|web_util_set_request_body||This function sets the specified string to be the request body for the next request sent in the conversation. This is applicable only when called from a callback.|
|web_util_set_formatted_request_body||This function is similar to the web_util_set_request_body function. However, this function is included as part of a Flex protocol asynchronous conversation instead of a Web(HTTP/HTML) protocol asynchronous conversation. This function expects an XML formatted request body, which will be converted before the request is sent.|
For details each of these functions, see the Function Reference.
The web_reg_async_attributes function should be called before the step that starts the asynchronous conversation.
The web_reg_async_attributes function receives a number of arguments that define the asynchronous conversation. One of these arguments is the URL of the asynchronous conversation. As soon as the replay engine downloads this URL in the step that follows the web_reg_async_attributes function, the asynchronous conversation begins.
The callbacks that are registered in the web_reg_async_attributes function enable the script developer to control some of the characteristics of the asynchronous conversation (for example, to change the URL). The asynchronous conversation continues until the web_stop_async step, or until the end of the iteration. In a push-type conversation, the server may close the connection and thereby end the conversation.
Note: Async functionality is not supported when replaying a Vuser script in WinINet mode.
For details on how the asynchronous functions differ from synchronous functions, see How Asynchronous Functions Differ from Synchronous Functions.