(See the README.md file in the upper level 'examples' directory for more information about examples.)
The application creates a TCP socket and tries to connect to the server with predefined IP address and port number. When a connection is successfully established, the application sends message and waits for the answer. After the server's reply, application prints received reply as ASCII text, waits for 2 seconds and sends another message.
This example can be configured to run on ESP32 and Linux target to communicate over IPv4 and IPv6.
```
idf.py menuconfig
```
Set following parameters under ```Example Configuration``` Options:
* Set `IP version` of example to be IPV4 or IPV6.
* Set `IPV4 Address` in case your chose IP version IPV4 above.
* Set `IPV6 Address` in case your chose IP version IPV6 above.
* For IPv6 there's an additional option for ```Interface selection```.
* Enter the name of the interface to explicitely establish communication over a specific interface.
* On selecting ```Auto``` the example will find the first interface with an IPv6 address and use it.
* Set `Port` number that represents remote port the example will connect to.
Configure Wi-Fi or Ethernet under "Example Connection Configuration" menu. See "Establishing Wi-Fi or Ethernet Connection" section in [examples/protocols/README.md](../../README.md) for more details.
Note: please replace `192.168.0.167 3333` with desired IPV4/IPV6 address (displayed in monitor console) and port number in the following command.
In addition to those tools, simple Python scripts can be found under sockets/scripts directory. Every script is designed to interact with one of the examples.