aboutsummaryrefslogtreecommitdiff
path: root/writer.go
diff options
context:
space:
mode:
authorOnur Gündüz <ogunduz@gmail.com>2026-10-08 02:47:42 +0200
committerOnur Gündüz <ogunduz@gmail.com>2026-10-08 02:54:55 +0200
commitd2ae1381c76f53c14fe4e6e4d9b557887cd93187 (patch)
treea4f67413af6bea45a982fba98c5b1826c6fb08e7 /writer.go
parent4660317cbba12af5ae1546948785301e7f9108b4 (diff)
downloadmuxer-d2ae1381c76f53c14fe4e6e4d9b557887cd93187.tar.gz
muxer-d2ae1381c76f53c14fe4e6e4d9b557887cd93187.zip
Update Go module path and source imports
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