mirror of
https://github.com/markqvist/Reticulum.git
synced 2025-05-06 08:25:57 -04:00
Implemented transport for links
This commit is contained in:
parent
67b13bca25
commit
d754ed989c
8 changed files with 110 additions and 35 deletions
|
@ -144,7 +144,7 @@ class Link:
|
|||
self.peer_pub.curve = Link.CURVE
|
||||
|
||||
def setLinkID(self, packet):
|
||||
self.link_id = RNS.Identity.truncatedHash(packet.raw)
|
||||
self.link_id = packet.getTruncatedHash()
|
||||
self.hash = self.link_id
|
||||
|
||||
def handshake(self):
|
||||
|
@ -218,7 +218,7 @@ class Link:
|
|||
rtt = umsgpack.unpackb(plaintext)
|
||||
self.rtt = max(measured_rtt, rtt)
|
||||
self.status = Link.ACTIVE
|
||||
# TODO: Link established callback moved here, ok?
|
||||
|
||||
if self.owner.callbacks.link_established != None:
|
||||
self.owner.callbacks.link_established(self)
|
||||
except Exception as e:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue