static void Main(string[] args) { TCPServer serv = new TCPServer(); serv.messageReceived += Console.WriteLine; //serv.StartServer(); Thread td = new Thread(serv.StartServer); td.Start(); TCPClient client = new TCPClient("127.0.0.1"); client.Connect(); client.send("Hallo Welt"); Console.ReadLine(); }