Advertisement
Guest User

Untitled

a guest
Feb 25th, 2018
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. (load "@lib/http.l" "@lib/xhtml.l")
  2.  
  3. (de go ()
  4. (server 8080 "!start") )
  5.  
  6. (de start ()
  7. (prin "HTTP/1.1 200 OK
  8.  
  9. Server: PicoLisp
  10.  
  11. Date: Sun, 25 Feb 2018 14:26:11 GMT
  12.  
  13. Cache-Control: max-age=0
  14.  
  15. Cache-Control: private, no-store, no-cache
  16.  
  17. Content-Type: text/event-stream
  18.  
  19. Transfer-Encoding: chunked
  20.  
  21.  
  22.  
  23. b
  24.  
  25. data: abc
  26.  
  27.  
  28.  
  29. b
  30.  
  31. data: def
  32.  
  33.  
  34.  
  35. b
  36.  
  37. data: ghi
  38.  
  39.  
  40.  
  41. " )
  42. (flush)
  43. (wait 20000)
  44. (prin "
  45.  
  46. b
  47.  
  48. data: abc
  49.  
  50.  
  51.  
  52. b
  53.  
  54. data: def
  55. ") )
  56.  
  57. (setq *Chunked T)
  58. #(de raw ()
  59. # (httpHead "text/event-stream" 0)
  60. # (for L '("abc" "def" "ghi")
  61. # (ht:Out *Chunked
  62. # (prin "id: 0
  63. #data: GOOG:533.37
  64. #
  65. #"))
  66. # (wait 1000))
  67. #
  68. #
  69. # )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement