add a context to Listener.Accept

This commit is contained in:
Marten Seemann
2019-05-28 16:03:38 +02:00
parent 8dbe1684be
commit 12bce1caaa
21 changed files with 74 additions and 40 deletions

View File

@@ -232,5 +232,5 @@ type Listener interface {
// Addr returns the local network addr that the server is listening on.
Addr() net.Addr
// Accept returns new sessions. It should be called in a loop.
Accept() (Session, error)
Accept(context.Context) (Session, error)
}