diff --git a/connection.go b/connection.go index a2f2080..e1b07c4 100644 --- a/connection.go +++ b/connection.go @@ -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