// Collection of code snippets by Arne Vajhøj 
// (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) 
import java.io.ObjectOutputStream;
import java.net.Socket;

public class Client2 {
   public static void main(String[] args) throws Exception {
      Socket s = new Socket("localhost", 10000);
      ObjectOutputStream oos = new ObjectOutputStream(s.getOutputStream());
      DummyData2 dd = new DummyData2();
      dd.a = 1;
      dd.b = 2;
      oos.writeObject(dd);
      dd.a = 3;
      dd.b = 4;
      oos.writeObject(dd);
   }
}
