Connects a client to an RTMP server.

Example Alphabetical Listing of Flex Functions (FLEX)
int flex_rtmp_connect( const char *stepname, "Host=<host:port>",  ["Snapshot=<snapshot_file>",] "ConnectionID=<connection_identifier>", "ResponseParameter=<resp_param>", MESSAGE, "DataType=<data_type>", "ChunkStreamID=<id>", "MessageStreamID=<stream>", "Argument=<argument>", ["ResponseParameter=<resp_param>",] MESSAGE, ... [..., ...,] 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 Mandatory.
Host Name of the RTMP server to which to connect. Always include the port number in the parameter. Use the format: "host:port". For example: myHost.vision.net.il:8080. Mandatory.
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.
ConnectionID The unique name of the connection on which this function operates. Do not change the recorded ID. Mandatory.
ResponseParameter The name of the parameter for storing the contents of all server responses when received. Optional.
MESSAGE The delimiter marking the beginning of the arguments that contain connection message information. At least one message must be specified.
ChunkStreamID The position of the chunk within the transmission. Mandatory.
MessageStreamID Integer value representing the RTMP stream ID.
DataType The data type of the message. If you create a step manually, use Command Message AMF0. Other types are formally supported by the protocol, but you are unlikely to encounter them in a flex_rtmp_connect call. For the list, see the DataType list in the reference for flex_rtmp_send.
Argument The RTMP data containing the body of the message to send to the server. The type of information specified in Argument is dependent on the DataType of the individual server response.
ResponseParameter The name of the parameter for storing the contents of the individual server response, when received. Optional.
LAST The delimiter marking the end of the argument list.

General Information

The flex_rtmp_connect function connects to an RTMP server, sets connection options, and creates a client session by opening a TCP/IP socket, performing an RTMP handshake, and sending a connection request to the RTMP server.

flex_rtmp_connect cannot use existing connections. If the function tries to open a TCP socket that already exists, the step fails.

The ChunkStreamID, DataType, and MessageStreamID arguments comprise the header for each message. The Argument argument contains the contents for each message that should be sent to the server.