aboutsummaryrefslogtreecommitdiff
path: root/format/pktline/constants.go
diff options
context:
space:
mode:
authorGravatar Runxi Yu2026-03-06 13:01:12 +0800
committerGravatar Runxi Yu2026-03-06 13:57:57 +0800
commit3307715a8d8bdeac1b2d7df66ec2abb6e503ba9a (patch)
tree4505d11668a6160aa0b04f38811f7a0a721b5db0 /format/pktline/constants.go
parent*: go fix ./... (diff)
signatureNo signature
format/pktline: Add pktline v0.1.62
Diffstat (limited to 'format/pktline/constants.go')
-rw-r--r--format/pktline/constants.go12
1 files changed, 12 insertions, 0 deletions
diff --git a/format/pktline/constants.go b/format/pktline/constants.go
new file mode 100644
index 00000000..811eb3c6
--- /dev/null
+++ b/format/pktline/constants.go
@@ -0,0 +1,12 @@
+package pktline
+
+const (
+ // DefaultPacketMax is a conservative packet size commonly used by
+ // line-oriented protocol messages.
+ DefaultPacketMax = 1000
+ // LargePacketMax is the maximum on-wire packet size including the
+ // 4-byte hexadecimal length header.
+ LargePacketMax = 65520
+ // LargePacketDataMax is the maximum payload size in one packet.
+ LargePacketDataMax = LargePacketMax - 4
+)