aboutsummaryrefslogtreecommitdiffstats
path: root/lib/src/main/java/com/trilead/ssh2/Session.java
diff options
context:
space:
mode:
authorKenny Root <kenny@the-b.org>2009-01-23 14:19:46 +0000
committerKenny Root <kenny@the-b.org>2009-01-23 14:19:46 +0000
commitb1f8f94ff046f59958bb5af0534aab81d1d8d9d4 (patch)
tree39e45f6d7c074a110ab9704f38c1a566c5e8c343 /lib/src/main/java/com/trilead/ssh2/Session.java
parent569080860fc43408b0c009508b7ad452120f1a6c (diff)
downloadsshlib-b1f8f94ff046f59958bb5af0534aab81d1d8d9d4.tar.gz
sshlib-b1f8f94ff046f59958bb5af0534aab81d1d8d9d4.tar.bz2
sshlib-b1f8f94ff046f59958bb5af0534aab81d1d8d9d4.zip
Comply with RFC 4254 on window-change packet
* Always send false for "want reply" * We don't need to wait since a reply should not be sent. * Allow the sending of (informational) pixel dimensions.
Diffstat (limited to 'lib/src/main/java/com/trilead/ssh2/Session.java')
-rw-r--r--lib/src/main/java/com/trilead/ssh2/Session.java23
1 files changed, 21 insertions, 2 deletions
diff --git a/lib/src/main/java/com/trilead/ssh2/Session.java b/lib/src/main/java/com/trilead/ssh2/Session.java
index c41d837..30efa6f 100644
--- a/lib/src/main/java/com/trilead/ssh2/Session.java
+++ b/lib/src/main/java/com/trilead/ssh2/Session.java
@@ -130,7 +130,26 @@ public class Session
terminal_modes);
}
- public void resizePTY(int width, int height) throws IOException {
+ /**
+ * Inform other side of connection that our PTY has resized.
+ * <p>
+ * Zero dimension parameters are ignored. The character/row dimensions
+ * override the pixel dimensions (when nonzero). Pixel dimensions refer to
+ * the drawable area of the window. The dimension parameters are only
+ * informational.
+ *
+ * @param term_width_characters
+ * terminal width, characters (e.g., 80)
+ * @param term_height_characters
+ * terminal height, rows (e.g., 24)
+ * @param term_width_pixels
+ * terminal width, pixels (e.g., 640)
+ * @param term_height_pixels
+ * terminal height, pixels (e.g., 480)
+ * @throws IOException
+ */
+ public void resizePTY(int term_width_characters, int term_height_characters, int term_width_pixels,
+ int term_height_pixels) throws IOException {
synchronized (this)
{
/* The following is just a nicer error, we would catch it anyway later in the channel code */
@@ -138,7 +157,7 @@ public class Session
throw new IOException("This session is closed.");
}
- cm.resizePTY(cn, width, height);
+ cm.resizePTY(cn, term_width_characters, term_height_characters, term_width_pixels, term_height_pixels);
}
/**