add stream deadlines to the Stream interface

This commit is contained in:
Marten Seemann
2017-06-11 15:43:52 +02:00
parent 1acdc5f18e
commit e09993403d
4 changed files with 19 additions and 11 deletions

View File

@@ -5,6 +5,7 @@ import (
"io"
"net/http"
"sync"
"time"
"golang.org/x/net/http2"
"golang.org/x/net/http2/hpack"
@@ -36,6 +37,9 @@ 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) 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") }
func (s *mockStream) Read(p []byte) (int, error) {
n, _ := s.dataToRead.Read(p)