aboutsummaryrefslogtreecommitdiffstats
path: root/device
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2021-02-22 18:47:41 +0100
committerJason A. Donenfeld <Jason@zx2c4.com>2021-02-25 15:08:08 +0100
commit3c11c0308e4e9fae76e1531f4f49a39f1ae24253 (patch)
tree6fbc8fba7161b0835e9e1bfba6d68bc82ad78301 /device
parentglobal: remove TODO name graffiti (diff)
downloadwireguard-go-3c11c0308e4e9fae76e1531f4f49a39f1ae24253.tar.xz
wireguard-go-3c11c0308e4e9fae76e1531f4f49a39f1ae24253.zip
conn: implement RIO for fast Windows UDP sockets
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'device')
-rw-r--r--device/queueconstants_default.go2
-rw-r--r--device/queueconstants_windows.go15
2 files changed, 16 insertions, 1 deletions
diff --git a/device/queueconstants_default.go b/device/queueconstants_default.go
index 773c2ca..d5c6927 100644
--- a/device/queueconstants_default.go
+++ b/device/queueconstants_default.go
@@ -1,4 +1,4 @@
-// +build !android,!ios
+// +build !android,!ios,!windows
/* SPDX-License-Identifier: MIT
*
diff --git a/device/queueconstants_windows.go b/device/queueconstants_windows.go
new file mode 100644
index 0000000..e330a6b
--- /dev/null
+++ b/device/queueconstants_windows.go
@@ -0,0 +1,15 @@
+/* SPDX-License-Identifier: MIT
+ *
+ * Copyright (C) 2017-2021 WireGuard LLC. All Rights Reserved.
+ */
+
+package device
+
+const (
+ QueueStagedSize = 128
+ QueueOutboundSize = 1024
+ QueueInboundSize = 1024
+ QueueHandshakeSize = 1024
+ MaxSegmentSize = 2048 - 32 // largest possible UDP datagram
+ PreallocatedBuffersPerPool = 0 // Disable and allow for infinite memory growth
+)