aboutsummaryrefslogtreecommitdiffstats
path: root/l/src/main.lisp
diff options
context:
space:
mode:
authorTeddy Wing2021-01-23 20:18:48 +0100
committerTeddy Wing2021-01-23 20:18:48 +0100
commite85f50d8b661891464f7558af6cb65b3548ed4e5 (patch)
treeb73cae57c1da9c9bf400d41692b941202ca0408c /l/src/main.lisp
parent1de259d861e1b1c879f6d8636aebce54eb8ce985 (diff)
downloadextreload-e85f50d8b661891464f7558af6cb65b3548ed4e5.tar.bz2
Send `Target.getTargets` message
Add a `sleep` just in case we need that to have time to print the message. Use the `jsown` project for JSON encoding and decoding.
Diffstat (limited to 'l/src/main.lisp')
-rw-r--r--l/src/main.lisp9
1 files changed, 8 insertions, 1 deletions
diff --git a/l/src/main.lisp b/l/src/main.lisp
index 78c5970..d78f027 100644
--- a/l/src/main.lisp
+++ b/l/src/main.lisp
@@ -9,6 +9,13 @@
(lambda (message)
(format t "~&Got: ~A~%" message)))
- (wsd:send *client* "msg")
+ (wsd:send *client* (get-targets-msg 1))
+
+ (sleep 1)
(wsd:close-connection *client*))
+
+(defun get-targets-msg (call-id)
+ (jsown:to-json
+ `(:obj ("id" . ,call-id)
+ ("method" . "Target.getTargets"))))