Learning server/client communications in Java