You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mina.apache.org by gn...@apache.org on 2015/08/18 09:39:56 UTC
mina-sshd git commit: [SSHD-550] Support sending window change
messages from PtyCapableChannelSession
Repository: mina-sshd
Updated Branches:
refs/heads/master 2678bbfe6 -> d2f8d47d2
[SSHD-550] Support sending window change messages from PtyCapableChannelSession
Project: http://git-wip-us.apache.org/repos/asf/mina-sshd/repo
Commit: http://git-wip-us.apache.org/repos/asf/mina-sshd/commit/d2f8d47d
Tree: http://git-wip-us.apache.org/repos/asf/mina-sshd/tree/d2f8d47d
Diff: http://git-wip-us.apache.org/repos/asf/mina-sshd/diff/d2f8d47d
Branch: refs/heads/master
Commit: d2f8d47d2a578494a9f2f855ee3734ca1fec137f
Parents: 2678bbf
Author: Guillaume Nodet <gn...@apache.org>
Authored: Tue Aug 18 09:26:23 2015 +0200
Committer: Guillaume Nodet <gn...@apache.org>
Committed: Tue Aug 18 09:26:23 2015 +0200
----------------------------------------------------------------------
.../client/channel/PtyCapableChannelSession.java | 15 +++++++++++++++
1 file changed, 15 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/d2f8d47d/sshd-core/src/main/java/org/apache/sshd/client/channel/PtyCapableChannelSession.java
----------------------------------------------------------------------
diff --git a/sshd-core/src/main/java/org/apache/sshd/client/channel/PtyCapableChannelSession.java b/sshd-core/src/main/java/org/apache/sshd/client/channel/PtyCapableChannelSession.java
index 43dc700..1dcfc26 100644
--- a/sshd-core/src/main/java/org/apache/sshd/client/channel/PtyCapableChannelSession.java
+++ b/sshd-core/src/main/java/org/apache/sshd/client/channel/PtyCapableChannelSession.java
@@ -194,6 +194,21 @@ public class PtyCapableChannelSession extends ChannelSession {
env.put(key, value);
}
+ public void sendWindowChange(int columns, int lines, int height, int width) throws IOException {
+ ptyColumns = columns;
+ ptyLines = lines;
+ ptyHeight = height;
+ ptyWidth = width;
+ Buffer buffer = session.createBuffer(SshConstants.SSH_MSG_CHANNEL_REQUEST);
+ buffer.putInt(recipient);
+ buffer.putString("window-change");
+ buffer.putInt(ptyColumns);
+ buffer.putInt(ptyLines);
+ buffer.putInt(ptyHeight);
+ buffer.putInt(ptyWidth);
+ writePacket(buffer);
+ }
+
protected void doOpenPty() throws IOException {
Buffer buffer;