mirror of
https://github.com/shazow/ssh-chat.git
synced 2025-04-13 15:47:17 +03:00
sshd: Better comments and changed += 1 to ++
This commit is contained in:
parent
e6233daefd
commit
9c918676ed
@ -55,7 +55,7 @@ func (c sshConn) Name() string {
|
|||||||
return c.User()
|
return c.User()
|
||||||
}
|
}
|
||||||
|
|
||||||
// Extending ssh/terminal to include a closer interface
|
// Terminal extends ssh/terminal to include a close method
|
||||||
type Terminal struct {
|
type Terminal struct {
|
||||||
terminal.Terminal
|
terminal.Terminal
|
||||||
Conn Connection
|
Conn Connection
|
||||||
@ -106,7 +106,7 @@ func NewTerminal(conn *ssh.ServerConn, ch ssh.NewChannel) (*Terminal, error) {
|
|||||||
return &term, nil
|
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) {
|
func NewSession(conn *ssh.ServerConn, channels <-chan ssh.NewChannel) (*Terminal, error) {
|
||||||
// Make a terminal from the first session found
|
// Make a terminal from the first session found
|
||||||
for ch := range channels {
|
for ch := range channels {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user