S01: Simple TCP Client (PLC / C++)

This sample shows the application of a TCP connection as client.
In this sample illustrates opening of a TCP connection with an IP address via port 80. The Beckhoff web server is used. The sample uses the connection to send an HTTP request to access a test website 62.159.14.51:80.

If the website does not fit into the receive buffer, the ReceiveData() method is called several times.

The client re-establishes a connection, if it was closed by the server, for example.

The sample is available for C++ and for the PLC.