Receives responses from an RTMP server.

Example Alphabetical Listing of Flex Functions (FLEX)
int flex_rtmp_receive( const char *stepname, "ConnectionID=<connection identifier>", ["Quantifier=ALL | ANY",]["Timeout=<timeout>",]["Snapshot=<snapshot_file>",]["ResponseParameter=<resp_param>",] CHANNEL, "ChunkStreamID=<id>", ["ResponseParameter=<resp_param>",][CHANNEL ..., ..., ...,] LAST );

This function returns LR_PASS (0) on success or LR_FAIL (1) on failure. Note that LR_PASS and LR_FAIL generally indicate whether the function call completed without an exception, and not that the test step succeeded.

All input string arguments (char type) except the step name can be parameterized using standard parameterization.


Name Comments
stepname A descriptive, unique name for this step. Use any text.Mandatory.
ConnectionID The unique name of the connection on which this function operates. Do not change the recorded ID. Mandatory.
Quantifier Either ALL or ANY. Whether to wait for all the specified server responses to return or to wait only for the first to return. Optional. Default: ALL.
Timeout The wait time for the response to arrive from the RTMP server, in milliseconds. If the timeout is exceeded, the function returns LR_FAIL. Optional. If no timeout value is passed, the function uses the Receive Timeout specified in the runtime settings.
Snapshot The name of the snapshot file (for example, "Snapshot=t31.inf") is generated automatically. Do not change it. When manually coding a Vuser script function call, do not enter it. When copying an existing function call, delete the Snapshot argument. Optional.
ResponseParameter ResponseParameter before any CHANNEL block is the name of the parameter in which to store the contents of all server responses for this step. Optional.
CHANNEL The delimiter marking the beginning of the arguments that contain channel information and the responses sent on that channel. At least one channel must be specified.
ChunkStreamID The position of the chunk within the transmission. Mandatory.
ResponseParameter ResponseParameter inside a CHANNEL block is the name of the parameter in which to store the contents of the individual server response corresponding to the CHANNEL. If the parameter is null, no data was received on the channel.Optional.
LAST The delimiter marking the end of the argument list.

General Information

The flex_rtmp_receive function waits for and receives server responses according to settings defined by the function.

The flex_rtmp_receive function does not necessitate a corresponding flex_rtmp_send function.

Data received using the flex_rtmp_receive function is recognized as a response to a flex_rtmp_send function if the functions refer to the same ConnectionID argument.

Even though RTMP is asynchronous, the flex_rtmp_receive function waits for either all or, depending on the value of the Quantifier argument, one of the server responses before advancing to the next test step. Expert users can edit the script using loops in C language to emulate asynchronous RTMP sessions.