From b7417240699ee12880c549b706c39a283311456a Mon Sep 17 00:00:00 2001 From: Marten Seemann Date: Thu, 5 Jan 2017 19:37:24 +0700 Subject: [PATCH] move utils.Stream interface to separate file --- utils/stream.go | 16 ++++++++++++++++ utils/utils.go | 11 ----------- 2 files changed, 16 insertions(+), 11 deletions(-) create mode 100644 utils/stream.go diff --git a/utils/stream.go b/utils/stream.go new file mode 100644 index 00000000..b4d73ce7 --- /dev/null +++ b/utils/stream.go @@ -0,0 +1,16 @@ +package utils + +import ( + "io" + + "github.com/lucas-clemente/quic-go/protocol" +) + +// Stream is the interface for QUIC streams +type Stream interface { + io.Reader + io.Writer + io.Closer + StreamID() protocol.StreamID + CloseRemote(offset protocol.ByteCount) +} diff --git a/utils/utils.go b/utils/utils.go index cf256795..f6c4e03b 100644 --- a/utils/utils.go +++ b/utils/utils.go @@ -3,19 +3,8 @@ package utils import ( "bytes" "io" - - "github.com/lucas-clemente/quic-go/protocol" ) -// Stream is the interface for QUIC streams -type Stream interface { - io.Reader - io.Writer - io.Closer - StreamID() protocol.StreamID - CloseRemote(offset protocol.ByteCount) -} - // ReadUintN reads N bytes func ReadUintN(b io.ByteReader, length uint8) (uint64, error) { var res uint64