private static void BattlEyeDisconnected(BattlEyeDisconnectEventArgs args) { //if (args.DisconnectionType == BattlEyeDisconnectionType.ConnectionLost) { /* Connection lost (timeout), if ReconnectOnPacketLoss is set to true it will reconnect */ } //if (args.DisconnectionType == BattlEyeDisconnectionType.SocketException) { /* Something went terribly wrong... */ } //if (args.DisconnectionType == BattlEyeDisconnectionType.Manual) { /* Disconnected by implementing application, that would be you */ } Console.WriteLine(args.Message); }
private void OnBattlEyeDisconneted(BattlEyeDisconnectEventArgs args) { // Save player stats on disconnect lock (_server.PlayerList) { foreach (PlayerInfo player in _server.PlayerList.Values) { OnPlayerDisconnect(player); } } }
private void HandleDisconnect(BattlEyeDisconnectEventArgs args) { switch (args.DisconnectionType) { case EBattlEyeDisconnectionType.Manual: break; case EBattlEyeDisconnectionType.ConnectionLost: Console.WriteLine("Connection lost. Trying reconnect..."); break; case EBattlEyeDisconnectionType.SocketException: Console.WriteLine("Invalid host"); break; case EBattlEyeDisconnectionType.LoginFailed: Console.WriteLine("Login invalid!"); break; default: Console.WriteLine("Unknown error"); break; } }
private void BattlEyeDisconnected(BattlEyeDisconnectEventArgs args) { AppConsole.Log("BE Disconnected", ConsoleColor.Yellow); Thread.Sleep(2000); Environment.Exit(0); }
private void HandleDisconnect(BattlEyeDisconnectEventArgs args) { switch (args.DisconnectionType) { case EBattlEyeDisconnectionType.Manual: break; case EBattlEyeDisconnectionType.ConnectionLost: Console.WriteLine("Connection lost."); break; case EBattlEyeDisconnectionType.SocketException: Console.WriteLine("Invalid host"); break; case EBattlEyeDisconnectionType.LoginFailed: Console.WriteLine("Login invalid!"); break; case EBattlEyeDisconnectionType.ConnectionFailed: this.write("Could not connect to Battleye. (Is Battleye enabled?)", ConsoleColor.DarkRed); break; default: Console.WriteLine("Unknown Battleye error!"); break; } }
private static void Disconnected(BattlEyeDisconnectEventArgs args) { Console.WriteLine(args.Message); }
private void HandleDisconnect(BattlEyeDisconnectEventArgs args) { switch (args.DisconnectionType) { case BattlEyeDisconnectionType.ConnectionLost: if (!_reconnecting) { if (_form != null) _form.Log("Connection to server was lost. Attempting to reconnect...", LogType.Console, false); this.Reconnect(); } break; case BattlEyeDisconnectionType.Manual: // Handle manual reconnect break; case BattlEyeDisconnectionType.SocketException: if (_form.connect.Enabled) { if (_form != null) _form.Log("Host invalid!", LogType.Console, false); } else { if (!_reconnecting) { if (_form != null) _form.Log("It appears that the server went down. Attempting to reconnect...", LogType.Console, false); this.Reconnect(); } } break; default: if (_form != null) _form.Log("Unknown error.", LogType.Console, false); break; } }
void _battlEyeClient_BattlEyeDisconnected(BattlEyeDisconnectEventArgs args) { OnDisconnectHandler(); }
void BattlEyeDisconnected(BattlEyeDisconnectEventArgs args) { if (OnBeDisconnectedEvent != null) { OnBeDisconnectedEvent(); } }
private void BattlEyeDisconnected(BattlEyeDisconnectEventArgs args) { connected = false; if (args.DisconnectionType.HasValue) { switch (args.DisconnectionType) { case BattlEyeDisconnectionType.Manual: LogDebug("RCON Disconnected"); return; case BattlEyeDisconnectionType.ConnectionLost: if (!reconnecting) { LogDebug("RCON Connection lost, attempting to reconnect"); BEReconnect(); return; } return; case BattlEyeDisconnectionType.SocketException: if (cbConnect.Enabled) { LogDebug("RCON Host invalid"); return; } else { if (!reconnecting) { LogDebug("RCON Server appears down, attempting to reconnect"); BEReconnect(); return; } return; } } } else { LogDebug("RCON Unknown error"); } }
/* DISCONNECT EVENT */ private void Disconnected(BattlEyeDisconnectEventArgs args) { mnuConnect.Enabled = false; doDisconnect(args.Message); }
private void Disconnected(BattlEyeDisconnectEventArgs args) { this.Log.Info(args.Message); }
private void ServerDisconnectEvent(BattlEyeDisconnectEventArgs args) { //if (args.DisconnectionType == BattlEyeDisconnectionType.ConnectionLost) // return; Logging.WriteServerLine("Disconnected from server! (" + args.DisconnectionType + ")", serverID.ToString()); Logging.WriteServerLine("Reconnecting...", serverID.ToString()); Stop(); //Thread.Sleep(5000); // sleep 5 seconds Connect(); }