guile-websocket provides an implementation of the WebSocket protocol as defined by RFC 6455.
Below is a simple example program that demonstrates basic usage of the guile-websocket API:
(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))
To build and install guile-websocket from source, run:
wget https://files.dthompson.us/releases/guile-websocket/guile-websocket-0.1.tar.gz tar xf guile-websocket-0.1.tar.gz cd guile-websocket-0.1 ./configure make make install
GNU LGPLv3+
guile-websocket is developed using the Git version control system. The official repository is hosted at https://git.dthompson.us/guile-websocket.git.
To clone the repository, run:
git clone https://git.dthompson.us/guile-websocket.git
Real-time discussion for guile-websocket can be found on the #guile
channel on the Libera.chat IRC network
Send patches and bug reports to davet@gnu.org.