mirror of
https://github.com/markqvist/Reticulum.git
synced 2024-11-26 15:30:18 +00:00
Updated Link example
This commit is contained in:
parent
e0e1868e50
commit
30c83951a4
@ -149,6 +149,7 @@ def client_loop():
|
|||||||
|
|
||||||
should_quit = False
|
should_quit = False
|
||||||
while not should_quit:
|
while not should_quit:
|
||||||
|
try:
|
||||||
print("> ", end=" ")
|
print("> ", end=" ")
|
||||||
text = input()
|
text = input()
|
||||||
|
|
||||||
@ -161,6 +162,9 @@ def client_loop():
|
|||||||
if text != "":
|
if text != "":
|
||||||
data = text.encode("utf-8")
|
data = text.encode("utf-8")
|
||||||
RNS.Packet(server_link, data).send()
|
RNS.Packet(server_link, data).send()
|
||||||
|
except Exception as e:
|
||||||
|
should_quit = True
|
||||||
|
server_link.teardown()
|
||||||
|
|
||||||
# This function is called when a link
|
# This function is called when a link
|
||||||
# has been established with the server
|
# has been established with the server
|
||||||
|
Loading…
Reference in New Issue
Block a user