forked from quic-go/quic-go
convert SendStream to a struct (#5172)
This commit is contained in:
@@ -30,8 +30,8 @@ var errGoAway = errors.New("connection in graceful shutdown")
|
||||
type Connection interface {
|
||||
OpenStream() (*quic.Stream, error)
|
||||
OpenStreamSync(context.Context) (*quic.Stream, error)
|
||||
OpenUniStream() (quic.SendStream, error)
|
||||
OpenUniStreamSync(context.Context) (quic.SendStream, error)
|
||||
OpenUniStream() (*quic.SendStream, error)
|
||||
OpenUniStreamSync(context.Context) (*quic.SendStream, error)
|
||||
LocalAddr() net.Addr
|
||||
RemoteAddr() net.Addr
|
||||
CloseWithError(quic.ApplicationErrorCode, string) error
|
||||
|
||||
@@ -147,7 +147,12 @@ func expectStreamReadReset(t *testing.T, str quic.ReceiveStream, errCode quic.St
|
||||
require.Equal(t, errCode, strErr.ErrorCode)
|
||||
}
|
||||
|
||||
func expectStreamWriteReset(t *testing.T, str quic.SendStream, errCode quic.StreamErrorCode) {
|
||||
type quicSendStream interface {
|
||||
io.Writer
|
||||
Context() context.Context
|
||||
}
|
||||
|
||||
func expectStreamWriteReset(t *testing.T, str quicSendStream, errCode quic.StreamErrorCode) {
|
||||
t.Helper()
|
||||
|
||||
select {
|
||||
|
||||
Reference in New Issue
Block a user