diff options
author | Teddy Wing | 2021-02-03 19:12:40 +0100 |
---|---|---|
committer | Teddy Wing | 2021-02-03 19:21:32 +0100 |
commit | b5c2f3a6ed194245e9c584f25b28d8f7c8f90218 (patch) | |
tree | 90fec16922c592355281009a50aff85c18d45592 /l/src/main.lisp | |
parent | 857302a5ac0714087a1f8d068e3bc5a15a1393d8 (diff) | |
download | extreload-b5c2f3a6ed194245e9c584f25b28d8f7c8f90218.tar.bz2 |
config: Initialise a new websocket-driver client on new config
Add a new `make-config` function to construct a `config` object. This
creates a new websocket-driver client and stores it in the `ws-client`
slot in the `config`.
Before this, I thought about using a writer method on the `socket-url`
slot that creates a new client. This didn't work in `make-instance`
though. Perhaps there's a way to have the `:initarg` use the writer, but
I'm not sure.
Diffstat (limited to 'l/src/main.lisp')
-rw-r--r-- | l/src/main.lisp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/l/src/main.lisp b/l/src/main.lisp index afa79d8..a84e0cd 100644 --- a/l/src/main.lisp +++ b/l/src/main.lisp @@ -26,6 +26,8 @@ ;; TODO: error if no `socket-url` (with-websocket-connection (*client*) (wsd:on :message *client* #'ws-on-message) + ; (wsd:on :message *client* #'(lambda (message) (ws-on-message message))) + ;; TODO: Maybe defvar *config* and store client in the config (websocket-send *client* (target-get-targets-msg 1)) |