public static void Main(string[] args) { Client cl = new Client(); Console.Write("Server IP Address: "); string IpAddress = Console.ReadLine(); Console.Write("Server Listening Port: "); int port = Int32.Parse(Console.ReadLine()); try { cl.Connect(IpAddress, port); Console.WriteLine(cl.ReadStringFromServer()); } catch (Exception) { Console.WriteLine("Connection lost, press any key to close."); Console.ReadLine(); return; } cl.HandleCommunication(); }