forked from quic-go/quic-go
http3: add a Context method to the StreamCreator interface (#3601)
This commit is contained in:
@@ -18,6 +18,8 @@ type HTTPStreamer interface {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type StreamCreator interface {
|
type StreamCreator interface {
|
||||||
|
// Context returns a context that is cancelled when the underlying connection is closed.
|
||||||
|
Context() context.Context
|
||||||
OpenStream() (quic.Stream, error)
|
OpenStream() (quic.Stream, error)
|
||||||
OpenStreamSync(context.Context) (quic.Stream, error)
|
OpenStreamSync(context.Context) (quic.Stream, error)
|
||||||
OpenUniStream() (quic.SendStream, error)
|
OpenUniStream() (quic.SendStream, error)
|
||||||
|
|||||||
@@ -173,7 +173,7 @@ type Connection interface {
|
|||||||
// CloseWithError closes the connection with an error.
|
// CloseWithError closes the connection with an error.
|
||||||
// The error string will be sent to the peer.
|
// The error string will be sent to the peer.
|
||||||
CloseWithError(ApplicationErrorCode, string) error
|
CloseWithError(ApplicationErrorCode, string) error
|
||||||
// The context is cancelled when the connection is closed.
|
// Context returns a context that is cancelled when the connection is closed.
|
||||||
Context() context.Context
|
Context() context.Context
|
||||||
// ConnectionState returns basic details about the QUIC connection.
|
// ConnectionState returns basic details about the QUIC connection.
|
||||||
// It blocks until the handshake completes.
|
// It blocks until the handshake completes.
|
||||||
|
|||||||
Reference in New Issue
Block a user