summaryrefslogtreecommitdiff
path: root/README
diff options
context:
space:
mode:
authorDavid Thompson <davet@gnu.org>2015-11-08 11:09:28 -0500
committerDavid Thompson <davet@gnu.org>2015-11-08 11:09:28 -0500
commitbd540a9de41a238049626f06758b4bc740b71b3d (patch)
treed0180fc121494e6726214d1dbdfbc631c0f09b36 /README
parent445602a86c9a86db035f97ea9efe830acc4d933d (diff)
Add missing code and a README.
Diffstat (limited to 'README')
-rw-r--r--README27
1 files changed, 27 insertions, 0 deletions
diff --git a/README b/README
new file mode 100644
index 0000000..5849d50
--- /dev/null
+++ b/README
@@ -0,0 +1,27 @@
+-*- mode: org -*-
+
+Guile-WebSocket is an implementation of the WebSocket protocol as
+defined by [[https://tools.ietf.org/html/rfc6455][RFC 6455]].
+
+* Test it out
+
+Run the example server:
+
+#+BEGIN_SRC sh
+ GUILE_LOAD_PATH="$PWD:$GUILE_LOAD_PATH" guile test.scm
+#+END_SRC
+
+Then, open a web browser and run the following in the JavaScript
+console:
+
+#+BEGIN_SRC javascript
+ var ws = new WebSocket("ws://localhost:9090");
+
+ ws.onmessage = function(message) {
+ console.log(message.data);
+ };
+
+ ws.send("hello, there!")
+#+END_SRC
+
+If everything works, "!ereht ,olleh" will be written to the JavaScript console.