From bd540a9de41a238049626f06758b4bc740b71b3d Mon Sep 17 00:00:00 2001 From: David Thompson Date: Sun, 8 Nov 2015 11:09:28 -0500 Subject: Add missing code and a README. --- test.scm | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 test.scm (limited to 'test.scm') diff --git a/test.scm b/test.scm new file mode 100644 index 0000000..92e61cf --- /dev/null +++ b/test.scm @@ -0,0 +1,10 @@ +(use-modules (web socket server)) + +;; Respond to text messages by reversing the message. Respond to +;; binary messages with "hello". +(define (handler data) + (if (string? data) + (string-reverse data) + "hello")) + +(run-server handler (make-server-socket #:port 9090)) -- cgit v1.2.3