diff --git a/connection.go b/connection.go index 11f6fe9..005d734 100644 --- a/connection.go +++ b/connection.go @@ -1,5 +1,6 @@ package hopp +import "io" import "net" // import "time" @@ -43,4 +44,7 @@ type Trans interface { Send(method uint16, data []byte) error // Receive receives a message. Receive() (method uint16, data []byte, err error) + // ReceiveReader receives a message as an [io.Reader]. Any reader + // previously opened through this function will be discarded. + ReceiveReader() (method uint16, size int64, data io.Reader, err error) }