From c51a81bc134c88e665c54a1790543d5db00b98dd Mon Sep 17 00:00:00 2001 From: Sasha Koshka Date: Fri, 25 Apr 2025 16:02:09 -0400 Subject: [PATCH] Add a SendWriter method to Trans --- connection.go | 3 +++ 1 file changed, 3 insertions(+) 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