From 47eba03a4b460ebd2dfddbee213e3f8b77ca29b9 Mon Sep 17 00:00:00 2001 From: Mark Qvist Date: Sun, 12 Jan 2025 17:29:06 +0100 Subject: [PATCH] Single HW_MTU field --- RNS/Interfaces/TCPInterface.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/RNS/Interfaces/TCPInterface.py b/RNS/Interfaces/TCPInterface.py index 51ac2a7..14d48c2 100644 --- a/RNS/Interfaces/TCPInterface.py +++ b/RNS/Interfaces/TCPInterface.py @@ -30,6 +30,9 @@ import sys import os import RNS +class TCPInterface(): + HW_MTU = 2**20 + class HDLC(): FLAG = 0x7E ESC = 0x7D @@ -96,7 +99,7 @@ class TCPClientInterface(Interface): connect_timeout = c.as_int("connect_timeout") if "connect_timeout" in c else None max_reconnect_tries = c.as_int("max_reconnect_tries") if "max_reconnect_tries" in c else None - self.HW_MTU = 32768 + self.HW_MTU = TCPInterface.HW_MTU self.IN = True self.OUT = False self.socket = None @@ -456,7 +459,7 @@ class TCPServerInterface(Interface): if port != None: bindport = port - self.HW_MTU = 32768 + self.HW_MTU = TCPInterface.HW_MTU self.online = False self.spawned_interfaces = []