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());
// done, close
socket.close();
ok = true;