Update main.cpp

Added the simple two way server and client communication.