Example code of communication between client-server using socket