Add sessions to tunnel

This commit is contained in:
Asim Aslam
2019-07-10 18:24:03 +01:00
parent c71576a538
commit f3d9177233
4 changed files with 142 additions and 15 deletions

View File

@@ -17,7 +17,13 @@ type Tunnel interface {
// Dial an endpoint
Dial(addr string) (Conn, error)
// Accept connections
Accept(addr string) (Conn, error)
Listen(addr string) (Listener, error)
}
type Listener interface {
Addr() string
Close() error
Accept() (Conn, error)
}
type Conn interface {