summaryrefslogtreecommitdiffhomepage
path: root/src/constants.go
diff options
context:
space:
mode:
authorMathias Hall-Andersen <mathias@hall-andersen.dk>2017-08-25 14:53:23 +0200
committerMathias Hall-Andersen <mathias@hall-andersen.dk>2017-08-25 14:53:23 +0200
commiteafa3df60689d3ad2b4316c42a8360ed47072a00 (patch)
treec46afc9ff50dd193a49f901103bf30b2db26b34e /src/constants.go
parent4986cfe78b49173b8a9d86b9ec7e3024d0a3c218 (diff)
Added fwmark code
Diffstat (limited to 'src/constants.go')
-rw-r--r--src/constants.go8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/constants.go b/src/constants.go
index 5ee8646..71dd98e 100644
--- a/src/constants.go
+++ b/src/constants.go
@@ -30,12 +30,14 @@ const (
QueueOutboundSize = 1024
QueueInboundSize = 1024
QueueHandshakeSize = 1024
- MinMessageSize = MessageTransportSize // size of keep-alive
- MaxMessageSize = ((1 << 16) - 1) + MessageTransportHeaderSize
- MaxPeers = 1 << 16
+ 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
)
const (
UnderLoadQueueSize = QueueHandshakeSize / 8
UnderLoadAfterTime = time.Second // how long does the device remain under load after detected
+ MaxPeers = 1 << 16 // maximum number of configured peers
)