From e85f50d8b661891464f7558af6cb65b3548ed4e5 Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Sat, 23 Jan 2021 20:18:48 +0100 Subject: 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. --- l/src/main.lisp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'l/src/main.lisp') 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")))) -- cgit v1.2.3