UDP socket contructor and doc update

This commit is contained in:
Mark Qvist 2021-12-10 16:23:35 +01:00
parent 293a834c35
commit e1e31692d7
5 changed files with 27 additions and 8 deletions

View File

@ -258,7 +258,9 @@ class AutoInterface(Interface):
if self.outbound_udp_socket == None: if self.outbound_udp_socket == None:
self.outbound_udp_socket = socket.socket(socket.AF_INET6, socket.SOCK_DGRAM) self.outbound_udp_socket = socket.socket(socket.AF_INET6, socket.SOCK_DGRAM)
self.outbound_udp_socket.sendto(data, (peer, self.data_port)) peer_addr = str(peer)+"%"+str(self.peers[peer][0])
addr_info = socket.getaddrinfo(peer_addr, self.data_port, socket.AF_INET6, socket.SOCK_DGRAM)
self.outbound_udp_socket.sendto(data, addr_info[0][4])
except Exception as e: except Exception as e:
RNS.log("Could not transmit on "+str(self)+". The contained exception was: "+str(e), RNS.LOG_ERROR) RNS.log("Could not transmit on "+str(self)+". The contained exception was: "+str(e), RNS.LOG_ERROR)

View File

@ -230,8 +230,7 @@ following content:
[Unit] [Unit]
Description=Reticulum Network Stack Daemon Description=Reticulum Network Stack Daemon
After=network.target After=multi-user.target
StartLimitIntervalSec=0
[Service] [Service]
Type=simple Type=simple
@ -240,6 +239,13 @@ following content:
User=USERNAMEHERE User=USERNAMEHERE
ExecStart=rnsd --service ExecStart=rnsd --service
# If you run Reticulum on WiFi devices,
# or other devices that need some extra
# time to initialise, you might want to
# add a short delay before Reticulum is
# started:
# ExecStartPre=/bin/sleep 5
[Install] [Install]
WantedBy=multi-user.target WantedBy=multi-user.target

File diff suppressed because one or more lines are too long

View File

@ -233,8 +233,7 @@ into a directory that is in systemds path:</p>
following content:</p> following content:</p>
<div class="highlight-text notranslate"><div class="highlight"><pre><span></span>[Unit] <div class="highlight-text notranslate"><div class="highlight"><pre><span></span>[Unit]
Description=Reticulum Network Stack Daemon Description=Reticulum Network Stack Daemon
After=network.target After=multi-user.target
StartLimitIntervalSec=0
[Service] [Service]
Type=simple Type=simple
@ -243,6 +242,13 @@ RestartSec=3
User=USERNAMEHERE User=USERNAMEHERE
ExecStart=rnsd --service ExecStart=rnsd --service
# If you run Reticulum on WiFi devices,
# or other devices that need some extra
# time to initialise, you might want to
# add a short delay before Reticulum is
# started:
# ExecStartPre=/bin/sleep 5
[Install] [Install]
WantedBy=multi-user.target WantedBy=multi-user.target
</pre></div> </pre></div>

View File

@ -230,10 +230,15 @@ following content:
[Unit] [Unit]
Description=Reticulum Network Stack Daemon Description=Reticulum Network Stack Daemon
After=network.target After=multi-user.target
StartLimitIntervalSec=0
[Service] [Service]
# If you run Reticulum on WiFi devices,
# or other devices that need some extra
# time to initialise, you might want to
# add a short delay before Reticulum is
# started by systemd:
# ExecStartPre=/bin/sleep 10
Type=simple Type=simple
Restart=always Restart=always
RestartSec=3 RestartSec=3