From f217d06882b4517cadbdd0250392724a0feb7085 Mon Sep 17 00:00:00 2001 From: David Thompson Date: Sat, 12 Nov 2022 20:11:59 -0500 Subject: Add guile-websocket project page. --- haunt.scm | 3 +++ projects.scm | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+) diff --git a/haunt.scm b/haunt.scm index b7f3faf..961ad0a 100644 --- a/haunt.scm +++ b/haunt.scm @@ -54,6 +54,8 @@ this website.") " — SDL2 bindings for Guile Scheme") (p ,(anchor "guile-syntax-highlight" "projects/guile-syntax-highlight.html") " — Syntax highlighting library for Guile Scheme") + (p ,(anchor "guile-websocket" "projects/guile-websocket.html") + " — WebSocket library for Guile Scheme") (p ,(anchor "Shroud" "projects/shroud.html") " — GPG-based password manager (inactive)") (p ,(anchor "Sly" "projects/sly.html") @@ -77,6 +79,7 @@ this website.") sly-page guile-sdl2-page guile-syntax-highlight-page + guile-websocket-page haunt-page shroud-page srt2vtt-page diff --git a/projects.scm b/projects.scm index 701f240..a6e6fb3 100644 --- a/projects.scm +++ b/projects.scm @@ -22,6 +22,7 @@ sly-page guile-sdl2-page guile-syntax-highlight-page + guile-websocket-page haunt-page shroud-page srt2vtt-page)) @@ -167,6 +168,39 @@ rendering.")) #:releases `(("0.1" ,(date 2018 03 10))))) +(define guile-websocket-page + (project-page + #:name "guile-websocket" + #:file-name "guile-websocket.html" + #:repo "guile-websocket" + #:description + `((p "guile-websocket provides an implementation of the WebSocket protocol +as defined by " + (a (@ (href "https://www.rfc-editor.org/rfc/rfc6455")) "RFC 6455") + ".")) + #:usage + `(p + "Below is a simple example program that demonstrates basic usage of +the guile-websocket API:" + ,(highlight-scheme + "(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)) +")) + #:requirements '("GNU Guile >= 2.0" + "GNU Make" + "GNU pkg-config") + #:license "GNU LGPLv3+" + #:releases + `(("0.1" ,(date 2022 11 12))))) + (define haunt-page (project-page #:name "Haunt" -- cgit v1.2.3