Renci.SshNet.BaseClient.StartKeepAliveTimer C# (CSharp) Method

StartKeepAliveTimer() private method

Starts the keep-alive timer.
When KeepAliveInterval is negative one (-1) milliseconds, then the timer will not be started.
private StartKeepAliveTimer ( ) : void
return void
        private void StartKeepAliveTimer()
        {
            if (_keepAliveInterval == SshNet.Session.InfiniteTimeSpan)
                return;

            if (_keepAliveTimer != null)
                // timer is already started
                return;

            _keepAliveTimer = new Timer(state => SendKeepAliveMessage(), null, _keepAliveInterval, _keepAliveInterval);
        }
    }