Alertra Script Language 1.9

recv

Retrieves waiting data from an open tcp or udp connection. If data is received before the timeout, it will be placed in $CONTENT. Otherwise, an error will be thrown. The default timeout is 20 seconds.

This command is typically used with the send command to interact directly with a network device.

usage: recv [timeout]

parameters:

req name type description
N timeout expression Number of seconds to wait on data if none is available.

examples

recv

Waits on the open connection until data is received or 20 seconds elapses, whichever is first.

recv 10

Waits on the open connection until data is received or 10 seconds elapses, whichever is first.

recv $TIMEOUT

Assuming TIMEOUT=25, waits on the open connection until data is received or 25 seconds elapses, whichever is first.


Alertra Script Language: Language Reference