Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (load "@lib/http.l" "@lib/xhtml.l")
- (de go ()
- (server 8080 "!start") )
- (de start ()
- (prin "HTTP/1.1 200 OK
- Server: PicoLisp
- Date: Sun, 25 Feb 2018 14:26:11 GMT
- Cache-Control: max-age=0
- Cache-Control: private, no-store, no-cache
- Content-Type: text/event-stream
- Transfer-Encoding: chunked
- b
- data: abc
- b
- data: def
- b
- data: ghi
- " )
- (flush)
- (wait 20000)
- (prin "
- b
- data: abc
- b
- data: def
- ") )
- (setq *Chunked T)
- #(de raw ()
- # (httpHead "text/event-stream" 0)
- # (for L '("abc" "def" "ghi")
- # (ht:Out *Chunked
- # (prin "id: 0
- #data: GOOG:533.37
- #
- #"))
- # (wait 1000))
- #
- #
- # )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement