From 2bfe6c88956688ee453d3be9800a6a3ad6ab86e6 Mon Sep 17 00:00:00 2001 From: Dominion Date: Sat, 15 Apr 2023 14:36:10 -0400 Subject: [PATCH] Define limits of bridge/topic requests and topic response strings --- .../Components/Interop/DMApiConstants.cs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/Tgstation.Server.Host/Components/Interop/DMApiConstants.cs b/src/Tgstation.Server.Host/Components/Interop/DMApiConstants.cs index 37c12cc642..f5c9ffc21b 100644 --- a/src/Tgstation.Server.Host/Components/Interop/DMApiConstants.cs +++ b/src/Tgstation.Server.Host/Components/Interop/DMApiConstants.cs @@ -33,6 +33,22 @@ namespace Tgstation.Server.Host.Components.Interop /// public const string TopicData = "tgs_data"; + /// + /// The maximum length of a BYOND side bridge request URL. + /// + /// Testing has revealed that response size is effectively limited only by other factors like RAM. + public const uint MaximumBridgeRequestLength = 8198; + + /// + /// The maximum length in bytes of a payload. + /// + public const uint MaximumTopicRequestLength = 65529; + + /// + /// The maximum length in bytes of a response. + /// + public const uint MaximumTopicResponseLength = 65528; + /// /// The DMAPI being used. ///