From f378120bf14725fcac3265f7f6283377e0faca38 Mon Sep 17 00:00:00 2001 From: realvarx Date: Thu, 13 Jul 2023 14:06:59 +0200 Subject: [PATCH] docs: update readme with REPL desc --- README.md | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 1486980..3a74093 100644 --- a/README.md +++ b/README.md @@ -94,7 +94,20 @@ There are 3 ways in which data can be sent and received from at server. print(response) ``` - + + +### CLI Tools +* **REPL** - you can use this to type atPlatform commands and see responses; but the best thing about the REPL currently is that it shows the data notifications as they are received. The REPL code has the essentials of what a 'receiving' client needs to do - i.e. + * create an AtClient (assigning a Queue object to its queue parameter) + * start two new threads + * one for the AtClient.start_monitor() task: receives data update/delete notification events (the event data contains the ciphertext) + * the other one calls handle_event() method, which will read the upcoming events in the queue and handle them: + * calling AtClient.handle_event() (to decrypt the notifications and introducing the result as a new event in the queue) + * reading the new event, which contains the decrypted result + * Instructions to run the REPL: + 1) Run repl.py and choose an atSign using option `1` + 2) Select option `2`. REPL will start and activate monitor mode automatically in a different thread. You can still send commands/verbs. You will start seeing your own notifications (from yourself to yourself) and heartbeat working (noop verb is sent from time to time as a keepalive) + 3) Use `at_talk` or any other tool to send notifications to your atSign from a different atSign. You should be able to see the complete notification, and the encrypted and decrypted value of it. ## Open source usage and contributions