From d2ae1381c76f53c14fe4e6e4d9b557887cd93187 Mon Sep 17 00:00:00 2001 From: Onur Gündüz Date: Thu, 8 Oct 2026 02:47:42 +0200 Subject: Update Go module path and source imports --- message.go | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'message.go') 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 -- cgit v1.3.1