Flex Functions (FLEX) > Alphabetical List of Functions > RTMP > flex_rtmp_send

flex_rtmp_send

Sends a request to an RTMP server.

Example Alphabetical Listing of Flex Functions (FLEX)
int flex_rtmp_send( const char *stepname, "ConnectionID=<connection identifier>", ["Snapshot=<snapshot_file>",] 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.

Arguments

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.
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.
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_send function sends a message to a server once a connection has been established.

Make sure the flex_rtmp_connect function is called before the first call to the script using the flex_rtmp_send function.

The flex_rtmp_send function does not necessitate a corresponding flex_rtmp_receive function; The script does not wait for a response after each flex_rtmp_send function.