TCPIP_SENDRCV

Syntax

Example

Description/ Remarks

TCPIP_SENDRCV connection_number, "string"

TCPIP_SENDRCV 1, "2000"

This command is used to send a data request "string" to the server / device via the specified TCP/IP connection number. This command also receives the data sent from the server as a response to the "string".

This command returns one of the following values:

  • If data is received from the server, this command returns a string formatted as  "1   data_from_server" (the number 1, two spaces, and then the data string from the server).

  • If the command cannot be executed, or if the timeout period elapses before data is received, this command returns a string beginning with "0" (zero).

    To determine whether this indicates a connection timeout, you can use the IF command to check for a TCPIP_ERROR of 997.

For information about connection numbers and timeout settings, see TCPIP_CONNECT.