A simple way to send and receive data through Linux socket API written in C++