/// <summary> /// Initiates a log out. In the process, disconnects and connects /// back to the server to ensure no state data is left on the server. /// </summary> public void LogOut(IClientSocket connection) { if (!IsLoggedIn) { return; } IsLoggedIn = false; AccountInfo = null; if ((connection != null) && connection.IsConnected) { connection.Reconnect(); } LoggedOut?.Invoke(); }
/// <summary> /// Initiates a log out. In the process, disconnects and connects /// back to the server to ensure no state data is left on the server. /// </summary> public void SignOut(IClientSocket connection) { if (!IsSignedIn) { return; } IsSignedIn = false; AccountInfo = null; if ((connection != null) && connection.IsConnected) { connection.Reconnect(); } OnSignedOutEvent?.Invoke(); }
/// <summary> /// Initiates a log out. In the process, disconnects and connects /// back to the server to ensure no state data is left on the server. /// </summary> public void LogOut(IClientSocket connection) { if (!IsLoggedIn) { return; } AccountInfo = null; if ((connection != null) && connection.IsConnected) { connection.Reconnect(); } if (LoggedOut != null) { LoggedOut.Invoke(); } }
/// <summary> /// Initiates a log out. In the process, disconnects and connects /// back to the server to ensure no state data is left on the server. /// </summary> public void SignOut(IClientSocket connection, bool permanent = false) { if (!IsSignedIn) { return; } IsSignedIn = false; AccountInfo = null; if (permanent) { ClearAuthToken(); } if (connection != null && connection.IsConnected) { connection.Reconnect(); } OnSignedOutEvent?.Invoke(); }