diff options
author | Teddy Wing | 2021-01-20 00:56:07 +0100 |
---|---|---|
committer | Teddy Wing | 2021-01-20 00:56:07 +0100 |
commit | 9d8f2058499295dc19852f07f45b433e48cbd118 (patch) | |
tree | 15b4cdae0d70dae9ae275efefeaa092738275cad | |
parent | 1c06d6f0fe55768a76ce1359262dd4d245798328 (diff) | |
download | extreload-9d8f2058499295dc19852f07f45b433e48cbd118.tar.bz2 |
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.
-rw-r--r-- | l/extreload.asd | 6 | ||||
-rw-r--r-- | l/src/main.lisp | 14 |
2 files changed, 20 insertions, 0 deletions
diff --git a/l/extreload.asd b/l/extreload.asd new file mode 100644 index 0000000..d377f2b --- /dev/null +++ b/l/extreload.asd @@ -0,0 +1,6 @@ +(asdf:defsystem "extreload" + :version "0.0.1" + :depends-on (:websocket-driver-client) + :components ((:module "src" + :serial t + :components ((:file "main"))))) 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*)) |