hashicorp/yamux

Wrong doc of func (*Session) Accept

AlexStocks opened this issue · 1 comments

On the page of yamux, the words of function Accept and AcceptSteam are as follows:

func (s *Session) Accept() (net.Conn, error)
Accept is used to block until the next available stream is ready to be accepted.

func (s *Session) AcceptStream() (*Stream, error)
AcceptStream is used to block until the next available stream is ready to be accepted.

Both are the same. Maybe the right illustration of function Accept is:
Accept is used to block until the next available connection is ready to be accepted.

The only difference is that AcceptStream() returns a *Stream, the docs are correct.