forked from quic-go/quic-go
implement a context for the stream
The context is cancelled when the write-side of the stream is closed.
This commit is contained in:
@@ -2,6 +2,7 @@ package h2quic
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"context"
|
||||
"io"
|
||||
"net/http"
|
||||
"sync"
|
||||
@@ -37,6 +38,7 @@ func (s *mockStream) Close() error { s.closed = true; r
|
||||
func (s *mockStream) Reset(error) { s.reset = true }
|
||||
func (s *mockStream) CloseRemote(offset protocol.ByteCount) { s.remoteClosed = true }
|
||||
func (s mockStream) StreamID() protocol.StreamID { return s.id }
|
||||
func (s *mockStream) Context() context.Context { panic("not implemented") }
|
||||
func (s *mockStream) SetDeadline(time.Time) error { panic("not implemented") }
|
||||
func (s *mockStream) SetReadDeadline(time.Time) error { panic("not implemented") }
|
||||
func (s *mockStream) SetWriteDeadline(time.Time) error { panic("not implemented") }
|
||||
|
||||
Reference in New Issue
Block a user