From 412ed6bb77c168c3690e3540a0e25180338a3c81 Mon Sep 17 00:00:00 2001 From: greysoh Date: Sat, 19 Oct 2024 16:48:16 -0400 Subject: [PATCH] feature: Makes "ConnStandardMaxBufSize" less. This makes "ConnStandardMaxBufSize" less, because, according to tests, it doesn't matter if it's 2 times. 65535 works fine on its own. Anything less than 65535 is dangerous, however. The maximum packet size in TCP is 64k, so if the maximum buffer size is less than that, it could cause issues, depending on the application. --- commons/conn.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/commons/conn.go b/commons/conn.go index 082705b..6c2db99 100644 --- a/commons/conn.go +++ b/commons/conn.go @@ -9,8 +9,8 @@ import ( "time" ) -// Give it 2x the max size for a TCP packet -var ConnStandardMaxBufSize = (65535 * 2) +// Max size for a TCP packet +var ConnStandardMaxBufSize = 65535 var CryptHeader = 43 // Wild