summaryrefslogtreecommitdiff
path: root/internal/packet
diff options
context:
space:
mode:
Diffstat (limited to 'internal/packet')
-rw-r--r--internal/packet/packet.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/internal/packet/packet.go b/internal/packet/packet.go
index 543b227..d3dcd7e 100644
--- a/internal/packet/packet.go
+++ b/internal/packet/packet.go
@@ -169,7 +169,7 @@ func (e PacketType) String() string {
}
const (
- VERSION = byte(1)
+ VERSION = byte(2)
PACKET_MAX_SIZE = math.MaxUint16
PAYLOAD_MAX_SIZE = PACKET_MAX_SIZE - HEADER_SIZE
HEADER_SIZE = 4
@@ -355,9 +355,11 @@ type PacketFramer struct {
buffer []byte
}
+const ReadQueueSize = 10
+
func NewFramer() PacketFramer {
return PacketFramer{
- Out: make(chan Packet, 10),
+ Out: make(chan Packet, ReadQueueSize),
}
}