Define the start of an asynchronous conversation
For a list of protocols that support asynchronous communication, see 64-bit recording, Async, and IPv6 support.
After VuGen scans a Vuser script for asynchronous communication, the Async tab of the Design Studio lists the asynchronous conversations that VuGen found in the script. VuGen inserts a web_reg_async_attributes into the Vuser script at the start of each asynchronous conversation that was detected. Use VuGen's Step Navigator to find the associated web_reg_async_attributes steps in the Vuser script. The web_reg_async_attributes steps should be located where the asynchronous conversations start when the script runs.
A web_reg_async_attributes step that is added to a Vuser script includes the following parameters:
- ID
- URL
- Pattern
- PollIntervalMS (for poll-type conversations only)
- RequestCB
-
ResponseBodyBufferCB (for push-type conversations only)
- ResponseHeadersCB (for push-type conversations only)
- ResponseCB
To initiate this conversation, VuGen inserts a web_reg_async_attributes step before the web_url step. The URL parameter in the web_reg_async_attributes and web_url steps is the same.
For details, see the Function Reference.
Inserting a Comment
When VuGen inserts a web_reg_async_attributes step into a script, VuGen inserts an associated comment before the web_reg_async_attributes step. The inserted comment contains information about the associated asynchronous conversation, such as the conversation ID, the communication pattern (push, poll, or long-poll), a list of URLs that are part of the asynchronous communication, and list of callbacks implemented in the AsyncCallbacks.c extra file.
The step comment contains a TODO token. The TODO token indicates that you should check the relevant callback implementations in the AsyncCallbacks.c extra file.
For details on how an asynchronous conversation is terminated, see Define the end of an asynchronous conversation.