mirror of
https://github.com/markqvist/Reticulum.git
synced 2025-05-02 06:36:14 -04:00
Resource transfer and receipt management optimisation
This commit is contained in:
parent
9a00bd2704
commit
be1ff8ec21
5 changed files with 90 additions and 40 deletions
|
@ -55,7 +55,8 @@ def server(configpath, path):
|
|||
|
||||
def announceLoop(destination):
|
||||
# Let the user know that everything is ready
|
||||
RNS.log("File server "+RNS.prettyhexrep(destination.hash)+" running, hit enter to manually send an announce (Ctrl-C to quit)")
|
||||
RNS.log("File server "+RNS.prettyhexrep(destination.hash)+" running")
|
||||
RNS.log("Hit enter to manually send an announce (Ctrl-C to quit)")
|
||||
|
||||
# We enter a loop that runs until the users exits.
|
||||
# If the user hits enter, we will announce our server
|
||||
|
@ -238,8 +239,9 @@ def download(filename):
|
|||
|
||||
# We just create a packet containing the
|
||||
# requested filename, and send it down the
|
||||
# link.
|
||||
request_packet = RNS.Packet(server_link, filename.encode("utf-8"))
|
||||
# link. We also specify we don't need a
|
||||
# packet receipt.
|
||||
request_packet = RNS.Packet(server_link, filename.encode("utf-8"), create_receipt=False)
|
||||
request_packet.send()
|
||||
|
||||
print("")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue