ltm rule command sendΒΆ

iRule(1)		      BIG-IP TMSH Manual		      iRule(1)



send
       Sends data on an existing sideband connection.

SYNOPSIS
       send ((
		   ('-timeout' MSEC)
		   ('-status' VARIABLE)
	       )#)?
	       ('--')?
	       SIDEBAND_CONNECTION
	       DATA

DESCRIPTION
       This command sends data on an existing sideband connection (established
       with connect). It is one of several commands that make up the ability
       to create sideband connections from iRules.

       Arguments

	    is the connection identifier returned from connect

	    is the data to send

	   -timeout ms specifies the amount of time to wait for the data to be sent. The default is an immediate timeout.

	   -status varname will save the result of the send command into varname. The possible status values are:
	       1. sent - the data was sent successfully
	       2. timeout - the specified timeout has occurred
	       3. closed - the sideband connection has closed
	       4. busy - the local TCP refused to accept the data

       Note: The send command may also raise a TCL error if the sideband
       connection was already closed. If a TCL error is raised, the status
       variable may be unset.

RETURN VALUE
       Sends data on a specified sideband connection, and returns an integer
       representing the amount of data that was sent.

VALID DURING
       ANY_EVENT

EXAMPLES
	when LB_SELECTED {
	    # Save some data to send
	    set dest "10.0.16.1:8888"
	    set data "GET /mypage/myindex2.html HTTP/1.0\r\n\r\n"

	    # Open a new TCP connection to $dest
	    set conn_id [connect -protocol TCP -timeout 30000 -idle 30 $dest]

	    # Send the data with a 1000ms timeout on the connection identifier received from the connect command
	    set send_bytes [send -timeout 1000 -status send_status $conn_id $data]

	    # Log the number of bytes sent and the send status
	    log local0. "Sent $send_bytes with status $send_status"
	}

HINTS
SEE ALSO
CHANGE LOG
       @BIGIP-11.0.0 --First introduced the command.



BIG-IP				  2017-01-31			      iRule(1)