internal/jsonrpc2_v2: clarify documentation
For golang/go#46520 Change-Id: Id9cdb539ae6f16e03d02f3b00b0b5ee06042a42f Reviewed-on: https://go-review.googlesource.com/c/tools/+/388594 Trust: Bryan Mills <bcmills@google.com> Run-TryBot: Bryan Mills <bcmills@google.com> Reviewed-by: Ian Cottrell <iancottrell@google.com> gopls-CI: kokoro <noreply+kokoro@google.com> TryBot-Result: Gopher Robot <gobot@golang.org>
This commit is contained in:
parent
280ef9a723
commit
87c9a8057e
1 changed files with 55 additions and 30 deletions
|
|
@ -18,17 +18,17 @@ import (
|
|||
|
||||
// Listener is implemented by protocols to accept new inbound connections.
|
||||
type Listener interface {
|
||||
// Accept an inbound connection to a server.
|
||||
// It must block until an inbound connection is made, or the listener is
|
||||
// shut down.
|
||||
// Accept accepts an inbound connection to a server.
|
||||
// It blocks until either an inbound connection is made, or the listener is closed.
|
||||
Accept(context.Context) (io.ReadWriteCloser, error)
|
||||
|
||||
// Close is used to ask a listener to stop accepting new connections.
|
||||
// Close closes the listener.
|
||||
// Any blocked Accept or Dial operations will unblock and return errors.
|
||||
Close() error
|
||||
|
||||
// Dialer returns a dialer that can be used to connect to this listener
|
||||
// locally.
|
||||
// If a listener does not implement this it will return a nil.
|
||||
// If a listener does not implement this it will return nil.
|
||||
Dialer() Dialer
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue