squash! websocket demo
authorRutger van Beusekom <rutger.van.beusekom@verum.com>
Wed, 18 Nov 2020 15:10:24 +0000 (16:10 +0100)
committerRutger van Beusekom <rutger.van.beusekom@verum.com>
Wed, 18 Nov 2020 15:10:24 +0000 (16:10 +0100)
demos/websocket/8s-server.scm

index 45e62bac9a1bfbfa451b55260bc819b8bd3d4129..c4b638f6e375baf05126200caf802437fb828b64 100755 (executable)
          (server (bootstrap-actor
                   hive <websocket-server>
                   #:port %server-port
-                  #:on-ws-connection
-                  (lambda (ws)
-                    (format (current-error-port) "on-ws-connection: ws=~s\n" ws)
-                    (when #f
-                      (set! (.on-close ws)
-                           (lambda (ws)
-                             (format (current-error-port) "on-close: ~s\n" ws)))
-                      (set! (.on-error ws)
-                            (lambda (ws e)
-                              (format (current-error-port) "on-error: ~s, ~s\n" ws e)))
-                      (set! (.on-message ws)
-                            (lambda (ws msg)
-                              (format (current-error-port) "on-message: ~s\n" msg)))
-                      (set! (.on-open ws)
-                            (lambda (ws)
-                              (format (current-error-port) "on-open: ~s\n" ws)))))
+                  #:on-ws-connection (lambda (ws)
+                                      (format (current-error-port) "on-ws-connection: ws=~s\n" ws))
                   #:on-ws-close (lambda (ws)
                                  (format (current-error-port) "on-close: ~s\n" ws))
                   #:on-ws-error (lambda (ws e)