public class Main { public static void main(String args[]) throws Exception {
ServerSocket ssock = new ServerSocket(1234);
Hashtable hash = new Hashtable();
hash.put("A", "a");
while (true) {
Socket sock = ssock.accept();
ObjectOutputStream ostream = new ObjectOutputStream(sock.getOutputStream());
ostream.writeObject(hash);
ostream.close();
sock.close();
}
}
}