Add ReceiveReader to Transaction interface
This commit is contained in:
parent
5c28510342
commit
4eae69dc94
@ -1,5 +1,6 @@
|
|||||||
package hopp
|
package hopp
|
||||||
|
|
||||||
|
import "io"
|
||||||
import "net"
|
import "net"
|
||||||
// import "time"
|
// import "time"
|
||||||
|
|
||||||
@ -43,4 +44,7 @@ type Trans interface {
|
|||||||
Send(method uint16, data []byte) error
|
Send(method uint16, data []byte) error
|
||||||
// Receive receives a message.
|
// Receive receives a message.
|
||||||
Receive() (method uint16, data []byte, err error)
|
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)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user