// send request
HashMap toWrite = new HashMap();
toWrite.put("Greetings form year ", 2014 );
toWrite.put("Random ", Math.random() );
socket.writeObject(toWrite);
socket.flush(); // <== important, else nothing happens !
// await 2 responses
System.out.println(socket.readObject());
System.out.println(socket.readObject());