mirror of
https://github.com/sshnet/SSH.NET.git
synced 2026-10-28 22:49:59 +08:00
Small doc fixes, fix warnings and prepare for beta 2.
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
|
||||
<metadata>
|
||||
<id>SSH.NET</id>
|
||||
<version>2014.4.6-beta1</version>
|
||||
<version>2014.4.6-beta2</version>
|
||||
<title>SSH.NET</title>
|
||||
<authors>Renci</authors>
|
||||
<owners>olegkap</owners>
|
||||
|
||||
@@ -257,22 +257,7 @@ namespace Renci.SshNet
|
||||
{
|
||||
CheckDisposed();
|
||||
|
||||
// only send keep-alive message when we still have a session
|
||||
if (Session != null)
|
||||
{
|
||||
// do not send multiple keep-alive messages concurrently
|
||||
if (Monitor.TryEnter(_keepAliveLock))
|
||||
{
|
||||
try
|
||||
{
|
||||
Session.TrySendMessage(new IgnoreMessage());
|
||||
}
|
||||
finally
|
||||
{
|
||||
Monitor.Exit(_keepAliveLock);
|
||||
}
|
||||
}
|
||||
}
|
||||
SendKeepAliveMessage();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -401,6 +386,26 @@ namespace Renci.SshNet
|
||||
_keepAliveTimer = null;
|
||||
}
|
||||
|
||||
private void SendKeepAliveMessage()
|
||||
{
|
||||
// do nothing if we have disposed or disconnected
|
||||
if (Session == null)
|
||||
return;
|
||||
|
||||
// do not send multiple keep-alive messages concurrently
|
||||
if (Monitor.TryEnter(_keepAliveLock))
|
||||
{
|
||||
try
|
||||
{
|
||||
Session.TrySendMessage(new IgnoreMessage());
|
||||
}
|
||||
finally
|
||||
{
|
||||
Monitor.Exit(_keepAliveLock);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Starts the keep-alive timer.
|
||||
/// </summary>
|
||||
@@ -414,7 +419,7 @@ namespace Renci.SshNet
|
||||
return;
|
||||
|
||||
if (_keepAliveTimer == null)
|
||||
_keepAliveTimer = new Timer(state => SendKeepAlive());
|
||||
_keepAliveTimer = new Timer(state => SendKeepAliveMessage());
|
||||
_keepAliveTimer.Change(_keepAliveInterval, _keepAliveInterval);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -63,6 +63,7 @@ namespace Renci.SshNet
|
||||
/// Stops local port forwarding, and waits for the specified timeout until all pending
|
||||
/// requests are processed.
|
||||
/// </summary>
|
||||
/// <param name="timeout">The maximum amount of time to wait for pending requests to finish processing.</param>
|
||||
protected override void StopPort(TimeSpan timeout)
|
||||
{
|
||||
if (IsStarted)
|
||||
|
||||
@@ -112,6 +112,7 @@ namespace Renci.SshNet
|
||||
/// Stops local port forwarding, and waits for the specified timeout until all pending
|
||||
/// requests are processed.
|
||||
/// </summary>
|
||||
/// <param name="timeout">The maximum amount of time to wait for pending requests to finish processing.</param>
|
||||
protected override void StopPort(TimeSpan timeout)
|
||||
{
|
||||
if (IsStarted)
|
||||
|
||||
@@ -134,6 +134,7 @@ namespace Renci.SshNet
|
||||
/// <summary>
|
||||
/// Stops remote port forwarding.
|
||||
/// </summary>
|
||||
/// <param name="timeout">The maximum amount of time to wait for pending requests to finish processing.</param>
|
||||
protected override void StopPort(TimeSpan timeout)
|
||||
{
|
||||
// if the port not started, then there's nothing to stop
|
||||
|
||||
@@ -24,7 +24,7 @@ namespace Renci.SshNet
|
||||
/// Creates a new <see cref="ISftpSession"/> in a given <see cref="ISession"/> and with
|
||||
/// the specified operation timeout and encoding.
|
||||
/// </summary>
|
||||
/// <param name="session">The <see cref="ISession"/> to create the <see cref="INetConfSession"/> in.</param>
|
||||
/// <param name="session">The <see cref="ISession"/> to create the <see cref="ISftpSession"/> in.</param>
|
||||
/// <param name="operationTimeout">The operation timeout.</param>
|
||||
/// <param name="encoding">The encoding.</param>
|
||||
/// <returns>
|
||||
|
||||
@@ -48,7 +48,7 @@ namespace Renci.SshNet.Security.Cryptography
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="SHA512Hash" /> class.
|
||||
/// </summary>
|
||||
public SHA2HashBase()
|
||||
protected SHA2HashBase()
|
||||
{
|
||||
this._buffer = new byte[8];
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ namespace Renci.SshNet
|
||||
/// Creates a new <see cref="ISftpSession"/> in a given <see cref="ISession"/> and with
|
||||
/// the specified operation timeout and encoding.
|
||||
/// </summary>
|
||||
/// <param name="session">The <see cref="ISession"/> to create the <see cref="INetConfSession"/> in.</param>
|
||||
/// <param name="session">The <see cref="ISession"/> to create the <see cref="ISftpSession"/> in.</param>
|
||||
/// <param name="operationTimeout">The operation timeout.</param>
|
||||
/// <param name="encoding">The encoding.</param>
|
||||
/// <returns>
|
||||
|
||||
Reference in New Issue
Block a user