Sample07: "Echo" client/server with TLS-PSK (basic modules)
The following sample is essentially based on Sample01 and shows an exemplary implementation of an "Echo" client/server system. The client sends a test string to the server at certain intervals (e.g. every second). The remote server sends this string back to the client.
In contrast to Sample01, the communication connection in this sample is secured via TLS with a pre-shared key (PSK).
In essence, this sample thus illustrates the use of the function blocks FB_TlsSocketConnect, FB_TlsSocketCreate, FB_TlsSocketListen, and FB_TlsSocketSetPsk. These were integrated accordingly into the state machine of the client and server sample from Sample01.