send/receive_text: send/show ack message
This commit is contained in:
parent
a67d6365f8
commit
18eec6e60b
|
@ -7,8 +7,8 @@ APPID = "lothar.com/wormhole/text-xfer"
|
||||||
# we're receiving
|
# we're receiving
|
||||||
start = time.time()
|
start = time.time()
|
||||||
code = sys.argv[1]
|
code = sys.argv[1]
|
||||||
blob = b"{}"
|
data = json.dumps({"message": "ok"}).encode("utf-8")
|
||||||
r = Receiver(APPID, blob, code)
|
r = Receiver(APPID, data, code)
|
||||||
them_bytes = r.get_data()
|
them_bytes = r.get_data()
|
||||||
them_d = json.loads(them_bytes.decode("utf-8"))
|
them_d = json.loads(them_bytes.decode("utf-8"))
|
||||||
print(them_d["message"])
|
print(them_d["message"])
|
||||||
|
|
|
@ -6,9 +6,9 @@ APPID = "lothar.com/wormhole/text-xfer"
|
||||||
|
|
||||||
# we're sending
|
# we're sending
|
||||||
message = sys.argv[1]
|
message = sys.argv[1]
|
||||||
blob = json.dumps({"message": message,
|
data = json.dumps({"message": message,
|
||||||
}).encode("utf-8")
|
}).encode("utf-8")
|
||||||
i = Initiator(APPID, blob)
|
i = Initiator(APPID, data)
|
||||||
code = i.get_code()
|
code = i.get_code()
|
||||||
print("Wormhole code is '%s'" % code)
|
print("Wormhole code is '%s'" % code)
|
||||||
print("On the other computer, please run:")
|
print("On the other computer, please run:")
|
||||||
|
|
Loading…
Reference in New Issue
Block a user