1
0
mirror of https://github.com/golang/go synced 2024-11-20 06:54:42 -07:00

exp/ssh: remove unused forwarding methods in Server Listener

R=agl, rsc
CC=golang-dev
https://golang.org/cl/5436056
This commit is contained in:
Dave Cheney 2011-11-23 09:35:01 -05:00 committed by Adam Langley
parent 4874d14180
commit d5514120b1

View File

@ -636,15 +636,15 @@ func (s *ServerConn) Accept() (Channel, error) {
// A Listener implements a network listener (net.Listener) for SSH connections.
type Listener struct {
listener net.Listener
config *ServerConfig
net.Listener
config *ServerConfig
}
// Accept waits for and returns the next incoming SSH connection.
// The receiver should call Handshake() in another goroutine
// to avoid blocking the accepter.
func (l *Listener) Accept() (*ServerConn, error) {
c, err := l.listener.Accept()
c, err := l.Listener.Accept()
if err != nil {
return nil, err
}
@ -652,16 +652,6 @@ func (l *Listener) Accept() (*ServerConn, error) {
return conn, nil
}
// Addr returns the listener's network address.
func (l *Listener) Addr() net.Addr {
return l.listener.Addr()
}
// Close closes the listener.
func (l *Listener) Close() error {
return l.listener.Close()
}
// Listen creates an SSH listener accepting connections on
// the given network address using net.Listen.
func Listen(network, addr string, config *ServerConfig) (*Listener, error) {