private static void ConnectToServer()
        {
            TcpClient myClient = new TcpClient();

            Thread.Sleep(3000);
            myClient.Connect(iPEndPoint);
            NetworkStream netStream = myClient.GetStream();
            //string einText = "blubba";
            AClass aclass = new AClass();

            BinaryFormatter binaryFormatter = new BinaryFormatter();

            binaryFormatter.Serialize(netStream, aclass);
        }
        private static void WaitForClient()
        {
            TcpClient connectedClient;

            tcpListener.Start();
            do
            {
                connectedClient = tcpListener.AcceptTcpClient();
                Console.WriteLine("waiting...");
            } while (connectedClient == null);

            Console.WriteLine("ClientConnected");
            BinaryFormatter binaryFormatter = new BinaryFormatter();
            //string sentFromClient = (string)binaryFormatter.Deserialize(connectedClient.GetStream());
            //Console.WriteLine(sentFromClient);
            AClass aclass = (AClass)binaryFormatter.Deserialize(connectedClient.GetStream());

            Console.WriteLine(aclass.eineZahl + " / " + aclass.einString);
            tcpListener.Stop();
            waitEnded = true;
        }