public static void Main(string[] args) { Console.WriteLine("Connecting to: " + Environment.CurrentDirectory); var client = new EventClient((m) => Console.WriteLine(m)); while (true) { client.Connect(Environment.CurrentDirectory); if (!client.IsConnected) { Thread.Sleep(50); continue; } Console.WriteLine("Connected"); while (client.IsConnected) { Thread.Sleep(50); } break; } }
public static void Main(string[] args) { Console.WriteLine("Connecting to: " + Environment.CurrentDirectory); var client = new EventClient((m) => Console.WriteLine(m)); while (true) { client.Connect(Environment.CurrentDirectory); if (!client.IsConnected) { Thread.Sleep(50); continue; } Console.WriteLine("Connected"); while (client.IsConnected) Thread.Sleep(50); break; } }
public static void Main(string[] args) { Console.WriteLine("Connecting to: " + Environment.CurrentDirectory); var client = new EventClient((m) => Console.WriteLine(m)); client.Connect(Environment.CurrentDirectory); Thread.Sleep(20000); while (client.IsConnected) Thread.Sleep(50); }