Browse Source

Updating examples

master
Daniel Ziltener 10 months ago
parent
commit
e81b389351
2 changed files with 3 additions and 3 deletions
  1. +2
    -2
      examples/example1.scm
  2. +1
    -1
      examples/example2.scm

+ 2
- 2
examples/example1.scm View File

@ -1,11 +1,11 @@
;; Run with 'awful example1.scm'.
;; On web browser open http://localhost:8080/client and watch the
;; new time coming each second from the server.
(use awful-sse awful spiffy posix srfi-18)
(import (chicken time posix) (chicken random) (awful sse) awful spiffy srfi-18)
(define (sse-proc)
(let loop ()
(send-sse-data (seconds->string) id: (random 10) event: "message")
(send-sse-data (seconds->string) id: (pseudo-random-integer 10) event: "message")
(thread-sleep! 1)
(loop)))


+ 1
- 1
examples/example2.scm View File

@ -2,7 +2,7 @@
;; Open two web browsers and point both to http://localhost:8080/client.
;; Try clicking on the blue and the red divs and see them changing their
;; boolean values on BOTH browsers.
(use awful-sse awful spiffy json posix srfi-18)
(import (chicken port) (awful sse) awful spiffy json srfi-18)
; Global variables are not good practice, but will suffice for the moment.
(define one #t)


Loading…
Cancel
Save