Script Command: TCP
TCP [-cdh:p:r] <}> [args] ...
The specific intent of this command is to allow a uCon script to communicate with some other uCon session that has an active telnet server; however, it is useful for communicating with any other TCP based server. By default the port is 23 and the host name is that of the host PC (IP = $MYIP); however the -p and -h options allow the user to override these defaults.
Options:
-comit '\n' from the end of line
-d <}>delay (milliseconds) between commands (used with SEND)
-h <{>hostname<}>override default of $MYIP
-p <{>port #<}>override default port number of 23 (telnet)
-ruse "\r\n" for line termination
Current sub-commands supported:
SEND -
Syntax: TCP SEND <{>"string to other TCP session"<}> ["next string"] ....
The "string to other TCP session" is terminated with a newline and passed to the remote server as a single TCP packet. Consider this a "one shot" telnet client, where the client simply establishes the connection with the server, sends over the string(s) and disconnects. If more than one string is specified, then the -d option can be used to adjust the default of 1 second delay put between each string sent.