Add string method to tunnel

This commit is contained in:
Asim Aslam 2019-08-20 17:21:35 +01:00
parent f848041c49
commit f8e68ae101
2 changed files with 6 additions and 0 deletions

View File

@ -606,3 +606,7 @@ func (t *tun) Listen(addr string) (Listener, error) {
// return the listener // return the listener
return tl, nil return tl, nil
} }
func (t *tun) String() string {
return "mucp"
}

View File

@ -19,6 +19,8 @@ type Tunnel interface {
Dial(addr string) (Conn, error) Dial(addr string) (Conn, error)
// Accept connections // Accept connections
Listen(addr string) (Listener, error) Listen(addr string) (Listener, error)
// Name of the tunnel implementation
String() string
} }
// The listener provides similar constructs to the transport.Listener // The listener provides similar constructs to the transport.Listener