summaryrefslogtreecommitdiffhomepage
path: root/constants.go
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2018-09-25 02:31:02 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2018-09-25 02:31:02 +0200
commit70bcf9ecb801dadd82c68143209ca2707aa63d2b (patch)
tree7d7f7483e7811344d9da1f824d46fef34892ea84 /constants.go
parentebc7541953269b39cd73d703166b9b8ee7b34e37 (diff)
Make it easy to restrict queue sizes more
Diffstat (limited to 'constants.go')
-rw-r--r--constants.go14
1 files changed, 5 insertions, 9 deletions
diff --git a/constants.go b/constants.go
index 167036f..e784a49 100644
--- a/constants.go
+++ b/constants.go
@@ -26,18 +26,14 @@ const (
PaddingMultiple = 16
)
-/* Implementation specific constants */
-
const (
- QueueOutboundSize = 1024
- QueueInboundSize = 1024
- QueueHandshakeSize = 1024
- MaxSegmentSize = (1 << 16) - 1 // largest possible UDP datagram
- MinMessageSize = MessageKeepaliveSize // minimum size of transport message (keepalive)
- MaxMessageSize = MaxSegmentSize // maximum size of transport message
- MaxContentSize = MaxSegmentSize - MessageTransportSize // maximum size of transport message content
+ MinMessageSize = MessageKeepaliveSize // minimum size of transport message (keepalive)
+ MaxMessageSize = MaxSegmentSize // maximum size of transport message
+ MaxContentSize = MaxSegmentSize - MessageTransportSize // maximum size of transport message content
)
+/* Implementation constants */
+
const (
UnderLoadQueueSize = QueueHandshakeSize / 8
UnderLoadAfterTime = time.Second // how long does the device remain under load after detected