Flex Functions (FLEX) > Alphabetical List of Functions > RTMP Tunneled > flex_rtmp_tunneled_connect

flex_rtmp_tunneled_connect

Connects a client to an RTMP server over HTTP.

Example Alphabetical Listing of Flex Functions (FLEX)
int flex_rtmp_tunneled_connect( const char *stepname, "Gateway=URL",  ["Snapshot=<snapshot_file>",] "SessionID=<session_identifier>", ["SendIdentReq=<yes/no>",] MESSAGE, "DataType=<data_type>", "ChunkStreamID=<id>", "MessageStreamID=<stream>", "Argument=<argument>", 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.

Arguments

Name Comments
stepname A descriptive, unique name for this step. Use any text. Mandatory.
Gateway The URL of the RTMP server to which to connect. 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.
SessionID The unique name of the session on which this function operates. Mandatory.
SendIdentReq If set to yes, the Ident2 request is sent. The default is yes. 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_tunneled_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.
LAST The delimiter marking the end of the argument list.

General Information

The flex_rtmp_tunneled_connect function performs an RTMP handshake and validates the connection.

The returned data is stored in the snapshot.

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.