aboutsummaryrefslogtreecommitdiff
path: root/vendor/golang.org/x/crypto/ssh/session.go
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2017-08-04 18:10:55 +0200
committerDimitri Sokolyuk <demon@dim13.org>2017-08-04 18:14:10 +0200
commitb1d650c6542a8573ecfb204a037df12731272822 (patch)
tree179c995ab096c96093c00dfe75de284f60241b0c /vendor/golang.org/x/crypto/ssh/session.go
parent603149f89679abf76b65ce1d5758c55e239cc104 (diff)
Update vendor
Diffstat (limited to 'vendor/golang.org/x/crypto/ssh/session.go')
-rw-r--r--vendor/golang.org/x/crypto/ssh/session.go20
1 files changed, 20 insertions, 0 deletions
diff --git a/vendor/golang.org/x/crypto/ssh/session.go b/vendor/golang.org/x/crypto/ssh/session.go
index 17e2aa8..cc06e03 100644
--- a/vendor/golang.org/x/crypto/ssh/session.go
+++ b/vendor/golang.org/x/crypto/ssh/session.go
@@ -231,6 +231,26 @@ func (s *Session) RequestSubsystem(subsystem string) error {
return err
}
+// RFC 4254 Section 6.7.
+type ptyWindowChangeMsg struct {
+ Columns uint32
+ Rows uint32
+ Width uint32
+ Height uint32
+}
+
+// WindowChange informs the remote host about a terminal window dimension change to h rows and w columns.
+func (s *Session) WindowChange(h, w int) error {
+ req := ptyWindowChangeMsg{
+ Columns: uint32(w),
+ Rows: uint32(h),
+ Width: uint32(w * 8),
+ Height: uint32(h * 8),
+ }
+ _, err := s.ch.SendRequest("window-change", false, Marshal(&req))
+ return err
+}
+
// RFC 4254 Section 6.9.
type signalMsg struct {
Signal string