diff options
author | David Thompson <davet@gnu.org> | 2015-11-08 11:09:28 -0500 |
---|---|---|
committer | David Thompson <davet@gnu.org> | 2015-11-08 11:09:28 -0500 |
commit | bd540a9de41a238049626f06758b4bc740b71b3d (patch) | |
tree | d0180fc121494e6726214d1dbdfbc631c0f09b36 /test.scm | |
parent | 445602a86c9a86db035f97ea9efe830acc4d933d (diff) |
Add missing code and a README.
Diffstat (limited to 'test.scm')
-rw-r--r-- | test.scm | 10 |
1 files changed, 10 insertions, 0 deletions
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)) |