Add a SendWriter method to Trans

This commit is contained in:
Sasha Koshka 2025-04-25 16:02:09 -04:00
parent 47645a8fce
commit c51a81bc13

View File

@ -42,6 +42,9 @@ type Trans interface {
// Send sends a message.
Send(method uint16, data []byte) error
// SendWriter sends data written to an [io.Writer]. Any writer
// previously opened through this function will be discarded.
SendWriter(method uint16) (io.Writer, error)
// Receive receives a message.
Receive() (method uint16, data []byte, err error)
// ReceiveReader receives a message as an [io.Reader]. Any reader