01: //*****
02:
03: import java.net.Socket;
04: import java.util.Map;
05: import java.io.ObjectInputStream;
06: public class SerialC {
07: public static void main(String[ ] args) throws Exception {
08: if (args.length < 1) {
09: System.err.println("SerialC <host>");
10: return;
11: }
12: int how_many = 4;
13: // Connect how_many times to the server to get Map
14: for (int i = 0; i < how_many; i++) {
15: Socket sock = new Socket(args[0], 9876);
16: ObjectInputStream in = new ObjectInputStream(sock.getInputStream());
17: Map map = (Map) in.readObject();
18: sock.close();
19: System.out.println("Dump from iteration " + (i + 1));
20: System.out.println(map);
21: }
22: }
23: }