浏览代码

Change default buffer size from 1024 * 32 - 38 to 1024 * 32 - 52

olegkap_cp 13 年之前
父节点
当前提交
7332af534c

+ 1 - 1
Renci.SshClient/Renci.SshNet/ScpClient.cs

@@ -61,7 +61,7 @@ namespace Renci.SshNet
             : base(connectionInfo)
         {
             this.OperationTimeout = new TimeSpan(0, 0, 0, 0, -1);
-            this.BufferSize = 1024 * 32 - 38;
+            this.BufferSize = 1024 * 32 - 52;
 
             if (_byteToChar == null)
             {

+ 1 - 1
Renci.SshClient/Renci.SshNet/Sftp/SftpSession.cs

@@ -385,7 +385,7 @@ namespace Renci.SshNet.Sftp
         /// <param name="wait">The wait event handle if needed.</param>
         internal void RequestWrite(byte[] handle, UInt64 offset, byte[] data, EventWaitHandle wait)
         {
-            var maximumDataSize = 1024 * 32 - 38;
+            var maximumDataSize = 1024 * 32 - 52;
 
             if (data.Length < maximumDataSize + 1)
             {

+ 1 - 1
Renci.SshClient/Renci.SshNet/SftpClient.cs

@@ -64,7 +64,7 @@ namespace Renci.SshNet
             : base(connectionInfo)
         {
             this.OperationTimeout = new TimeSpan(0, 0, 0, 0, -1);
-            this.BufferSize = 1024 * 32 - 38;
+            this.BufferSize = 1024 * 32 - 52;
         }
 
         /// <summary>