Source File
connection.go
Belonging Package
golang.org/x/crypto/ssh
package ssh
import (
)
type OpenChannelError struct {
Reason RejectionReason
Message string
}
func ( *OpenChannelError) () string {
return fmt.Sprintf("ssh: rejected: %s (%s)", .Reason, .Message)
}
User() string
SessionID() []byte
ClientVersion() []byte
ServerVersion() []byte
type Conn interface {
ConnMetadata
Close() error
Wait() error
}
type connection struct {
transport *handshakeTransport
sshConn
type sshConn struct {
conn net.Conn
user string
sessionID []byte
clientVersion []byte
serverVersion []byte
}
func ( []byte) []byte {
:= make([]byte, len())
copy(, )
return
}
func ( *sshConn) () string {
return .user
}
func ( *sshConn) () net.Addr {
return .conn.RemoteAddr()
}
func ( *sshConn) () error {
return .conn.Close()
}
func ( *sshConn) () net.Addr {
return .conn.LocalAddr()
}
func ( *sshConn) () []byte {
return dup(.sessionID)
}
func ( *sshConn) () []byte {
return dup(.clientVersion)
}
func ( *sshConn) () []byte {
return dup(.serverVersion)
![]() |
The pages are generated with Golds v0.3.2-preview. (GOOS=darwin GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @Go100and1 (reachable from the left QR code) to get the latest news of Golds. |