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


Sends a request to an RTMP server over HTTP.

Example Alphabetical Listing of Flex Functions (FLEX)
int flex_rtmp_tunneled_send( const char *stepname, "SessionID=<session identifier>", ["Snapshot=<snapshot_file>",]   ["ContinueToNextStepAfter=<msec>",]  [ContinueMode=<AbsoluteTimestamp|DeltaFromNow>,] MESSAGE, "DataType=<data_type>",["EventType=<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.


Name Comments
stepname A descriptive, unique name for this step. Use any text. Mandatory.
SessionID The unique name of the session on which this function operates. 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.
ContinueToNextStepAfter Used only with streaming media. The minimum play duration of the stream to download before continuing to the next step (milliseconds). How the duration is interpreted depends on the ContinueMode argument. See below, Continue Mode.
ContinueMode One of AbsoluteTimestamp (default) or DeltaFromNow. See below, Continue Mode
MESSAGE The delimiter marking the beginning of the arguments that contain message information. At least one message must be specified.
DataType The data type for control messages is one of:
  • Abort Message

  • Acknowledgment

  • Set Chunk Size

  • Set Peer Bandwidth

  • User Control Message

  • Window Acknowledgment Size

The data type for general messages is one of:
  • Aggregate Message

  • Audio Data

  • Command Message AMF0

  • Command Message AMF3

  • Data Message AMF0

  • Data Message AMF3

  • Shared Object AMF 0

  • Shared Object AMF 3

  • Video Data

EventType The event type applies to User Control Message data type.
  • Ping Request

  • Ping Response

  • Set Buffer Length

  • Stream Begin

  • Stream DRY

  • Stream EOF

  • Stream Is recorded

ChunkStreamID The position of the chunk within the transmission. Mandatory.Mandatory for all general mesage data types.Cannot be used with control message data types.See DataType in this table.
MessageStreamID The RTMP stream ID. Mandatory for all general mesage data types.Cannot be used with control message data types.See DataType in this table.
Argument The RTMP data containing the body of the message (meaning, the contents that are being sent in the packet). The type of information specified in Argument is dependent on the DataType of the individual server response.Cannot be used with control message data types.See DataType in this table.
LAST The delimiter marking the end of the argument list.

General Information

The flex_rtmp_tunneled_send function sends a message to a server once a connection has been established.

Make sure the flex_rtmp_tunneled_connect function is called before the first call to the script using the flex_rtmp_tunneled_send function.

The data returned from the server is stored in the snapshot.

Continue Mode

Each chunk of the streaming feed has a time stamp indicating play duration from the beginning of the stream. When downloading a clip, the initial time stamp is generally 0. When downloading a live feed, the initial time stamp received depends on how long the feed has been working at the time this Vuser begins receiving the stream. When resuming a paused stream, the initial time stamp depends on when the Pause was sent.

If ContinueMode=AbsoluteTimestamp or if no mode is specified, then after a time stamp having the ContinueToNextStepAfter value or greater is received, the script run proceeds to the next step.

For example, if a movie is downloading and ContinueToNextStepAfter=60000, flex_rtmp_tunneled_send returns and the script continues to the next step after enough of the stream has downloaded for the movie to run for at least one minute.The stream may continue in the background on the same socket, but this will not be reflected in the logs.

If ContinueMode=DeltaFromNow, then LoadRunner saves the first time stamp received. This function returns when a time stamp of at least the initial time stamp plus the ContinueToNextStepAfter value is received.

For example, ContinueMode=DeltaFromNow and ContinueToNextStepAfter=60000. The first time stamp received from a live stream is 100,000. flex_rtmp_tunneled_send returns and the script continues to the next step after a time stamp of 160,000 or greater is received.