internal void StartLoginServer() { bool success = false; //NOTIFY LOGIN SERVER while (success == false) { try { Console.WriteLine("Connect to authentication server: {0}:{1}", _host_2, _port_2); Socket sock = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp); sock.Connect(_host_2, _port_2); InterNetwork = new InternalClient(sock); InterNetwork.WORLD_NOTIFYCATION(); success = true; } catch (SocketException) { Console.WriteLine("Cannot create connection with authentication server"); WriteError("NetworkManager", "Cannot create connection with authentication server"); Thread.Sleep(60000); } catch (Exception ex) { WriteError("NetworkManager", "A unknown exception occurred: {0} {1}", ex.Source, ex.Message); Thread.Sleep(60000); } } }