mirror of
https://github.com/markqvist/Reticulum.git
synced 2025-05-02 14:46:05 -04:00
Implemented requests and responses of arbitrary sizes using resources.
This commit is contained in:
parent
1dc6655017
commit
212518a345
6 changed files with 206 additions and 89 deletions
|
@ -502,7 +502,6 @@ def download_concluded(resource):
|
|||
|
||||
saved_filename = current_filename
|
||||
|
||||
|
||||
if resource.status == RNS.Resource.COMPLETE:
|
||||
counter = 0
|
||||
while os.path.isfile(saved_filename):
|
||||
|
|
|
@ -23,7 +23,7 @@ APP_NAME = "example_utilities"
|
|||
# A reference to the latest client link that connected
|
||||
latest_client_link = None
|
||||
|
||||
def random_text_generator(path, data, request_id, remote_identity_hash, requested_at):
|
||||
def random_text_generator(path, data, request_id, remote_identity, requested_at):
|
||||
RNS.log("Generating response to request "+RNS.prettyhexrep(request_id))
|
||||
texts = ["They looked up", "On each full moon", "Becky was upset", "I’ll stay away from it", "The pet shop stocks everything"]
|
||||
return texts[random.randint(0, len(texts)-1)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue