mirror of
https://github.com/markqvist/Reticulum.git
synced 2025-08-19 11:37:50 -04:00
Basic interface rate estimation
This commit is contained in:
parent
7923322d92
commit
2f71296816
5 changed files with 49 additions and 5 deletions
|
@ -551,6 +551,7 @@ class Transport:
|
|||
if packet.attached_interface == None and interface.mode == RNS.Interfaces.Interface.Interface.MODE_ACCESS_POINT:
|
||||
RNS.log("Blocking announce broadcast on "+str(interface)+" due to AP mode", RNS.LOG_DEBUG)
|
||||
should_transmit = False
|
||||
# TODO: Add capacity limit based on interface bandwidth
|
||||
|
||||
if should_transmit:
|
||||
if not stored_hash:
|
||||
|
@ -923,7 +924,7 @@ class Transport:
|
|||
local_rebroadcasts = 0
|
||||
block_rebroadcasts = False
|
||||
attached_interface = None
|
||||
retransmit_timeout = now + math.pow(Transport.PATHFINDER_C, packet.hops) + (PATHFINDER_D*packet.hops) + (RNS.rand() * Transport.PATHFINDER_RW)
|
||||
retransmit_timeout = now + math.pow(Transport.PATHFINDER_C, packet.hops) + (Transport.PATHFINDER_D*packet.hops) + (RNS.rand() * Transport.PATHFINDER_RW)
|
||||
|
||||
if packet.receiving_interface.mode == RNS.Interfaces.Interface.Interface.MODE_ACCESS_POINT:
|
||||
expires = now + Transport.AP_PATH_TIME
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue