Get the latest tech news
How to Use Secure Sockets in C on Linux
Ensure your socket connections are safe. Don't rely on others to protect your data learn how to use secure sockets in C on Linux!
Tools like Wireshark allow anyone with access to the same physical network to potentially read every byte you send or receive this way. While you could implement encryption algorithms yourself (which is an interesting learning experience), you should rely on established, well-tested, and well-maintained crypto libraries. The main part of the program is wrapped in the while(1) loop, and all it does is accepting socket connections, opening them with an SSL context, and transmitting data.
Or read this on Hacker News