Feedback

  • Contents
 

TCP/IP tools overview

The TCP/IP tools allow handlers to connect and communicate with other's applications on a LAN, WAN, or over the Internet. As long as the remote machine has a valid IP address and the remote application is ready, the TCP/IP tools can send and receive strings and integers.

The TCP/IP tools are typically used in the following order within a handler. As shown in this diagram entitled The order in which TCP/IP tools should be used. Use this multi-step process as guide when creating TCP/IP functionality within a handler.

Step One: Open a Connection

Whether you are connecting to a remote computer or the remote computer is connecting to CIC, you must first establish a connection. When you establish the connection, the resulting connection handle is used by the read and write tools to communicate with the remote computer. If you are connecting to a remote computer, use the Tcp Connect tool. If the remote computer is connecting to CIC, use the Tcp Listen tool to monitor a port. When the remote computer makes a connection, the Tcp Listen tool generates an event that starts the Tcp Connection Accepted initiator. This initiator generates the connection handle.

Step Two: Send and Receive Strings and Integers

Once the connection handle is established, the Tcp Read String and Tcp Read Integer tools can take data sent by the remote computer and place it in a variable to be used within the handler. Tcp Write String and Tcp Write Integer can send data to the remote computer. To read and write UTF8-encoded strings, use Tcp Read String UTF8 and Tcp Write String UTF8.

Step Three: Closing the Connection

When the handler has finished sending and receiving data, we recommend that you close the connection with the remote computer. The Tcp Close tool closes the connection stored in the connection handle.