Updating examples
This commit is contained in:
parent
324324c4a9
commit
e81b389351
2 changed files with 3 additions and 3 deletions
|
@ -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)))
|
||||
|
||||
|
|
|
@ -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…
Reference in a new issue