static void Main(string[] args) { Console.ReadLine(); client = new Client("127.0.0.1", 25566); receiver.Start(); Console.Write("Enter a name: "); client.Write(new ConnectionData(Console.ReadLine())); Message messageToSend; while (true) { messageToSend = new Message(Console.ReadLine()); client.Write(messageToSend); } }