From 9d8f2058499295dc19852f07f45b433e48cbd118 Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Wed, 20 Jan 2021 00:56:07 +0100 Subject: Add a foundation for a Common Lisp version Trying to see if I can write the program in Common Lisp. Learned how to set up an .asd project file and started with some websocket client code based on the example in: https://github.com/fukamachi/websocket-driver#client-side Need to work out how to set up JSON interaction. --- l/src/main.lisp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 l/src/main.lisp (limited to 'l/src/main.lisp') diff --git a/l/src/main.lisp b/l/src/main.lisp new file mode 100644 index 0000000..8c622fc --- /dev/null +++ b/l/src/main.lisp @@ -0,0 +1,14 @@ +(in-package :extreload) + +(defvar *client* (wsd:make-client "ws://127.0.0.1:53954/devtools/browser/0a276302-a6e8-4f7e-9fbf-6ea97b55aa99")) + +(defun main () + (wsd:start-connection *client*) + + (wsd:on :message *client* + (lambda (message) + (format t "~&Got: ~A~%" message))) + + (wsd:send *client* "msg") + + (wsd:close-connection *client*)) -- cgit v1.2.3