mirror of
https://github.com/markqvist/Reticulum.git
synced 2026-07-28 02:28:10 -07:00
Epoll backend switch
This commit is contained in:
@@ -127,7 +127,9 @@ class Interface:
|
||||
|
||||
def optimise_mtu(self):
|
||||
if self.AUTOCONFIGURE_MTU:
|
||||
if self.bitrate > 16_000_000:
|
||||
if self.bitrate > 500_000_000:
|
||||
self.HW_MTU = 1048576
|
||||
elif self.bitrate > 16_000_000:
|
||||
self.HW_MTU = 262144
|
||||
elif self.bitrate > 8_000_000:
|
||||
self.HW_MTU = 131072
|
||||
|
||||
@@ -62,7 +62,7 @@ class LocalClientInterface(Interface):
|
||||
self.HW_MTU = 262144
|
||||
self.online = False
|
||||
|
||||
if socket_path != None and RNS.vendor.platformutils.is_linux(): self.socket_path = f"\0rns/{socket_path}"
|
||||
if socket_path != None and RNS.vendor.platformutils.use_epoll(): self.socket_path = f"\0rns/{socket_path}"
|
||||
else: self.socket_path = None
|
||||
|
||||
self.IN = True
|
||||
@@ -77,7 +77,7 @@ class LocalClientInterface(Interface):
|
||||
self.frame_buffer = b""
|
||||
self.transmit_buffer = b""
|
||||
|
||||
if RNS.vendor.platformutils.is_linux():
|
||||
if RNS.vendor.platformutils.use_epoll():
|
||||
self.epoll_backend = True
|
||||
|
||||
if connected_socket != None:
|
||||
@@ -349,7 +349,7 @@ class LocalServerInterface(Interface):
|
||||
self.name = "Reticulum"
|
||||
self.mode = RNS.Interfaces.Interface.Interface.MODE_FULL
|
||||
|
||||
if RNS.vendor.platformutils.is_linux():
|
||||
if RNS.vendor.platformutils.use_epoll():
|
||||
self.epoll_backend = True
|
||||
|
||||
if socket_path != None and self.epoll_backend:
|
||||
|
||||
Reference in New Issue
Block a user