import java.io.*;
import java.net.Socket;
public class Client {
void senden(){
try {
Testobj t1 = new Testobj();
Testobj t2 = new Testobj();
Socket server = new Socket("localhost", 1234);
System.out.println("Mit Server verbunden");
OutputStream out = server.getOutputStream();
Object[] array = new Object[2];
array[0]=t1;
array[1]=t2;
BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(out));
bw.write(array[]);
bw.newLine();
bw.flush();
out.close();
} catch (Exception e) {
System.out.println("Fehler: "+e);
e.printStackTrace();
}
}
}