Add string method to tunnel
This commit is contained in:
parent
f848041c49
commit
f8e68ae101
@ -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"
|
||||||
|
}
|
||||||
|
@ -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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user