Skip to content

Commit 6452fda

Browse files
Added support for sshnet#1061 Window Change Request in ShellStream
1 parent b9bc475 commit 6452fda

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

src/Renci.SshNet/ShellStream.cs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
using System.Threading;
88
using System.Text.RegularExpressions;
99
using Renci.SshNet.Abstractions;
10+
using System.CodeDom;
11+
using System.Runtime.InteropServices;
1012

1113
namespace Renci.SshNet
1214
{
@@ -52,6 +54,19 @@ public bool DataAvailable
5254
}
5355
}
5456
}
57+
/// <summary>
58+
/// Sends a Window Change Request via the Channel.
59+
/// </summary>
60+
/// <param name="columns">New screen width in # of columns</param>
61+
/// <param name="rows">New screen height in # of rows</param>
62+
/// <param name="width">New screen width in Pixels</param>
63+
/// <param name="height">New screen height in Pixels</param>
64+
/// <returns>true when change is successful, or false when channel is NOT open or the request </returns>
65+
public bool WindowChangeRequest(uint columns, uint rows, uint width, uint height )
66+
{
67+
if (_channel==null || !_channel.IsOpen) return false;
68+
return _channel.SendWindowChangeRequest(columns, rows, width, height);
69+
}
5570

5671
/// <summary>
5772
/// Gets the number of bytes that will be written to the internal buffer.

0 commit comments

Comments
 (0)