summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/shazow/ssh-chat/sshd/terminal.go
diff options
context:
space:
mode:
authorWim <wim@42.be>2019-11-17 21:42:41 +0100
committerGitHub <noreply@github.com>2019-11-17 21:42:41 +0100
commitd4253d7a55f7af862304fb65c461547055dd294a (patch)
tree8a8c5ed06841ea2bd3a24639dcd5462cfdbfea32 /vendor/github.com/shazow/ssh-chat/sshd/terminal.go
parent0917dc876613fd71c9726a34bf0138b4f5121be9 (diff)
downloadmatterbridge-msglm-d4253d7a55f7af862304fb65c461547055dd294a.tar.gz
matterbridge-msglm-d4253d7a55f7af862304fb65c461547055dd294a.tar.bz2
matterbridge-msglm-d4253d7a55f7af862304fb65c461547055dd294a.zip
Update shazow/ssh-chat dependency (#947)
Diffstat (limited to 'vendor/github.com/shazow/ssh-chat/sshd/terminal.go')
-rw-r--r--vendor/github.com/shazow/ssh-chat/sshd/terminal.go9
1 files changed, 6 insertions, 3 deletions
diff --git a/vendor/github.com/shazow/ssh-chat/sshd/terminal.go b/vendor/github.com/shazow/ssh-chat/sshd/terminal.go
index 977e146e..472b5c15 100644
--- a/vendor/github.com/shazow/ssh-chat/sshd/terminal.go
+++ b/vendor/github.com/shazow/ssh-chat/sshd/terminal.go
@@ -7,14 +7,17 @@ import (
"sync"
"time"
+ "github.com/shazow/ssh-chat/sshd/terminal"
"golang.org/x/crypto/ssh"
- "golang.org/x/crypto/ssh/terminal"
)
var keepaliveInterval = time.Second * 30
var keepaliveRequest = "keepalive@ssh-chat"
+// ErrNoSessionChannel is returned when there is no session channel.
var ErrNoSessionChannel = errors.New("no session channel")
+
+// ErrNotSessionChannel is returned when a channel is not a session channel.
var ErrNotSessionChannel = errors.New("terminal requires session channel")
// Connection is an interface with fields necessary to operate an sshd host.
@@ -52,7 +55,7 @@ func (c sshConn) Name() string {
return c.User()
}
-// Extending ssh/terminal to include a closer interface
+// Terminal extends ssh/terminal to include a close method
type Terminal struct {
terminal.Terminal
Conn Connection
@@ -103,7 +106,7 @@ func NewTerminal(conn *ssh.ServerConn, ch ssh.NewChannel) (*Terminal, error) {
return &term, nil
}
-// Find session channel and make a Terminal from it
+// NewSession Finds a session channel and make a Terminal from it
func NewSession(conn *ssh.ServerConn, channels <-chan ssh.NewChannel) (*Terminal, error) {
// Make a terminal from the first session found
for ch := range channels {