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