BonCodeAJP13.BonCodeAJP13ServerConnection.p_KeepAliveTimer_Elapsed C# (CSharp) Method

p_KeepAliveTimer_Elapsed() private method

Handler for the Keep Alive timer. Close the connection when timer has elapsed.
private p_KeepAliveTimer_Elapsed ( object sender, System e ) : void
sender object
e System
return void
        private void p_KeepAliveTimer_Elapsed(object sender, System.Timers.ElapsedEventArgs e)
        {
            p_AbortConnection = true;
            ((Timer)sender).Dispose(); // should be equivalent but rather be safe  p_KeepAliveTimer.Dispose();
            ConnectionError("Timeout on Connection ID " + p_ThisConnectionID, "Time Out");
        }