mirror of
https://github.com/markqvist/Reticulum.git
synced 2025-05-04 15:35:42 -04:00
Cleanup
This commit is contained in:
parent
3f64141455
commit
2bf75f60bc
2 changed files with 6 additions and 24 deletions
|
@ -28,8 +28,8 @@ def server(configpath):
|
|||
# We must first initialise Reticulum
|
||||
reticulum = RNS.Reticulum(configpath)
|
||||
|
||||
# Randomly create a new identity for our link example
|
||||
server_identity = RNS.Identity()
|
||||
RNS.log("created new identity", RNS.LOG_VERBOSE)
|
||||
|
||||
# We create a destination that clients can connect to. We
|
||||
# want clients to create links to this destination, so we
|
||||
|
@ -58,7 +58,7 @@ def server_loop(destination):
|
|||
" running, waiting for a connection."
|
||||
)
|
||||
|
||||
RNS.log("Hit enter to manually send an announce (Ctrl-C or \"quit\" to quit)")
|
||||
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
|
||||
|
@ -68,12 +68,6 @@ def server_loop(destination):
|
|||
entered = input()
|
||||
destination.announce()
|
||||
RNS.log("Sent announce from "+RNS.prettyhexrep(destination.hash))
|
||||
if entered == "quit":
|
||||
if latest_client_link:
|
||||
latest_client_link.teardown()
|
||||
break
|
||||
print("")
|
||||
exit()
|
||||
|
||||
# When a client establishes a link to our server
|
||||
# destination, this function will be called with
|
||||
|
@ -294,4 +288,4 @@ if __name__ == "__main__":
|
|||
|
||||
except KeyboardInterrupt:
|
||||
print("")
|
||||
exit()
|
||||
exit()
|
Loading…
Add table
Add a link
Reference in a new issue