diff options
Diffstat (limited to 'l/src/macro.lisp')
-rw-r--r-- | l/src/macro.lisp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/l/src/macro.lisp b/l/src/macro.lisp index 4d69294..283cf9f 100644 --- a/l/src/macro.lisp +++ b/l/src/macro.lisp @@ -2,3 +2,9 @@ (defmacro filter (predicate list-form) `(remove-if-not ,predicate ,list-form)) + +(defmacro with-websocket-connection ((client) &body body) + `(progn + (wsd:start-connection ,client) + (unwind-protect (progn ,@body) + (wsd:close-connection ,client)))) |