mirror of
https://github.com/markqvist/Reticulum.git
synced 2025-05-02 06:36:14 -04:00
Updated path requests
This commit is contained in:
parent
33ce3ef48f
commit
67b13bca25
4 changed files with 18 additions and 11 deletions
|
@ -198,7 +198,7 @@ class Destination:
|
|||
|
||||
# Creates an announce packet for this destination.
|
||||
# Application specific data can be added to the announce.
|
||||
def announce(self,app_data=None):
|
||||
def announce(self, app_data=None, path_response=False):
|
||||
destination_hash = self.hash
|
||||
random_hash = RNS.Identity.getRandomHash()
|
||||
|
||||
|
@ -216,5 +216,10 @@ class Destination:
|
|||
if app_data != None:
|
||||
announce_data += app_data
|
||||
|
||||
RNS.Packet(self, announce_data, RNS.Packet.ANNOUNCE).send()
|
||||
if path_response:
|
||||
announce_context = RNS.Packet.PATH_RESPONSE
|
||||
else:
|
||||
announce_context = RNS.Packet.NONE
|
||||
|
||||
RNS.Packet(self, announce_data, RNS.Packet.ANNOUNCE, context = announce_context).send()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue