forked from quic-go/quic-go
move utils.Stream interface to separate file
This commit is contained in:
16
utils/stream.go
Normal file
16
utils/stream.go
Normal file
@@ -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)
|
||||
}
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user