TCP Client Operation

The following figure shows the flow for transferring data with a TCP client.

Figure 1. TCP Client Sequence Diagram
Notes:
  1. 1.The host application must register a socket notification callback function. The function must be of tpfAppSocketCb type and must handle socket event notifications appropriately.
  2. 2.If the client knows the IP of the server, it may call connect directly as shown in the figure above. If only the server URL is known, then the application must resolve the server URL first calling the gethostbyname API.