- Contents
Interaction Designer Help
TCP Read String
This File I/O tool reads a string value passed in by another computer over a TCP/IP connection.
Inputs
Socket handle
A unique socket connection identifier generated by the TCP Connect or TCP/IP Connection Accepted.
String type
The type of string being read.
Number of characters to read
The maximum number of characters to read before taking the Success exit path. If the end of string character is read before reaching the maximum, this tool stops reading and takes the Success exit path.
Characters to indicate end of string
The character that denotes the end of the string. If the maximum number of characters is read before reading the end of string character, this tool stops reading and takes the Success exit path. If multiple characters are assigned, this tool will recognize only the first assigned character. For example, if "end" is configured to indicate the end of the string, this tool will recognize only the "e" as the end of string character and will stop reading the first time it encounters an "e."
Other characters you might want to use include are listed below. CIC interprets the following characters when this tool executes. For example, if you specify "\t," a tab indicates the end of the string.
"\n" |
CIC interprets this as a new line |
"\r" |
CIC interprets this as a carriage return |
"\t" |
CIC interprets this as a tab character |
" " |
CIC interprets this as a space |
"\"" |
CIC interprets this as a quotation mark |
Read timeout
The number of seconds to wait for the integer before taking the Timeout exit path.
Outputs
String value
The read string value.
Exit Paths
Success
This tool takes the Success exit path if the connection is established and a value is returned.
Timeout
This tool takes the Timeout exit path if nothing was read within the number of seconds specified in the Read timeout parameter.
Failure
This tool takes the Failure exit path if the socket handle is invalid.