forked from quic-go/quic-go
improve API documentation for OpenStreamSync (#4352)
* docs: improve API documentation for OpenStreamSync Both `OpenStream` and `OpenStreamSync` themselves only create steam objects locally, but `OpenStreamSync` does not add document descriptions, which will cause ambiguity. * additional description
This commit is contained in:
committed by
GitHub
parent
a70419b49f
commit
ac1268911e
@@ -163,6 +163,9 @@ type Connection interface {
|
||||
OpenStream() (Stream, error)
|
||||
// OpenStreamSync opens a new bidirectional QUIC stream.
|
||||
// It blocks until a new stream can be opened.
|
||||
// There is no signaling to the peer about new streams:
|
||||
// The peer can only accept the stream after data has been sent on the stream,
|
||||
// or the stream has been reset or closed.
|
||||
// If the error is non-nil, it satisfies the net.Error interface.
|
||||
// If the connection was closed due to a timeout, Timeout() will be true.
|
||||
OpenStreamSync(context.Context) (Stream, error)
|
||||
|
||||
Reference in New Issue
Block a user