mirror of
https://github.com/markqvist/Reticulum
synced 2026-11-22 23:10:32 +00:00
Local link traffic counting
This commit is contained in:
2 files changed
+2
No files matched your search
@@ -1031,6 +1031,7 @@ class Link:
|
||||
if packet.context != RNS.Packet.KEEPALIVE: self.last_data = self.last_inbound
|
||||
self.rx += 1
|
||||
self.rxbytes += len(packet.data)
|
||||
RNS.Transport.link_rxb += len(packet.raw)
|
||||
if self.status == Link.STALE: self.status = Link.ACTIVE
|
||||
|
||||
if packet.packet_type == RNS.Packet.DATA:
|
||||
|
||||
@@ -309,6 +309,7 @@ class Packet:
|
||||
self.destination.last_outbound = time.time()
|
||||
self.destination.tx += 1
|
||||
self.destination.txbytes += len(self.ciphertext)
|
||||
RNS.Transport.link_txb += len(self.raw)
|
||||
|
||||
if RNS.Transport.outbound(self): return self.receipt
|
||||
else:
|
||||
|
||||
Reference in new issue
Block a user