//sudo apt-get install build-essentials
git clone https://github.com/br382/c_socket_example
cd c_socket_example
make
Based on the article here. And translated with minor updates to use mem* rather than b_ obsolete functions. Code is commented for understanding of the basic communication steps.