A simple example of using socket for communication