aboutsummaryrefslogtreecommitdiff
path: root/writer.go
diff options
context:
space:
mode:
Diffstat (limited to 'writer.go')
-rw-r--r--writer.go8
1 files changed, 5 insertions, 3 deletions
diff --git a/writer.go b/writer.go
index 7e1947a..3980f03 100644
--- a/writer.go
+++ b/writer.go
@@ -1,12 +1,14 @@
-package binproto
+package muxer
import (
"bufio"
"encoding/binary"
)
-// A Writer implements convenience methods for writing
-// requests or responses to a binary protocol network connection.
+// Writer implements a buffered message writer for the muxer protocol.
+// It encodes and writes messages to an underlying bufio.Writer, handling
+// message framing and varint-based length encoding. Writer is not safe for
+// concurrent use by multiple goroutines.
type Writer struct {
wd *bufio.Writer
scratch [20]byte