summaryrefslogtreecommitdiffhomepage
path: root/src/constants.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/constants.go')
-rw-r--r--src/constants.go12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/constants.go b/src/constants.go
index 4e8d521..0384741 100644
--- a/src/constants.go
+++ b/src/constants.go
@@ -4,15 +4,17 @@ import (
"time"
)
+/* Specification constants */
+
const (
RekeyAfterMessages = (1 << 64) - (1 << 16) - 1
+ RejectAfterMessages = (1 << 64) - (1 << 4) - 1
RekeyAfterTime = time.Second * 120
RekeyAttemptTime = time.Second * 90
- RekeyTimeout = time.Second * 5 // TODO: Exponential backoff
+ RekeyTimeout = time.Second * 5
RejectAfterTime = time.Second * 180
- RejectAfterMessages = (1 << 64) - (1 << 4) - 1
KeepaliveTimeout = time.Second * 10
- CookieRefreshTime = time.Minute * 2
+ CookieRefreshTime = time.Second * 120
MaxHandshakeAttemptTime = time.Second * 90
)
@@ -20,11 +22,13 @@ const (
RekeyAfterTimeReceiving = RekeyAfterTime - KeepaliveTimeout - RekeyTimeout
)
+/* Implementation specific constants */
+
const (
QueueOutboundSize = 1024
QueueInboundSize = 1024
QueueHandshakeSize = 1024
QueueHandshakeBusySize = QueueHandshakeSize / 8
MinMessageSize = MessageTransportSize // keep-alive
- MaxMessageSize = 4096
+ MaxMessageSize = 4096 // TODO: make depend on the MTU?
)