aboutsummaryrefslogtreecommitdiff
path: root/message.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 /message.go
parent4660317cbba12af5ae1546948785301e7f9108b4 (diff)
downloadmuxer-d2ae1381c76f53c14fe4e6e4d9b557887cd93187.tar.gz
muxer-d2ae1381c76f53c14fe4e6e4d9b557887cd93187.zip
Update Go module path and source imports
Diffstat (limited to 'message.go')
-rw-r--r--message.go13
1 files changed, 8 insertions, 5 deletions
diff --git a/message.go b/message.go
index fad8976..bc0a6e0 100644
--- a/message.go
+++ b/message.go
@@ -1,10 +1,13 @@
-package binproto
+package muxer
-// A Message represents a single binproto message.
+// Message represents a single protocol message with a channel ID, type, and payload.
//
-// Each message starts with an header which is a varint encoded
-// unsigned 64-bit integer which consists of a channel ID (first 60-bits) and
-// a message type (last 4-bits), the rest of the message is payload.
+// ┌──────────────────────────────────────────────┐
+// │ length | channel ID × message type │ payload │
+// └──────────────────────────────────────────────┘
+//
+// Each message starts with a varint encoded unsigned 64-bit integer which consists of
+// a channel ID (first 60-bits) and a message type (last 4-bits) followed by the payload.
type Message struct {
ID uint64
Type uint8