- define-page/sse path contents sse-path sse-proc #!key css title doctype headers charset no-ajax no-template no-session no-db vhost-root-path no-javascript-compression use-ajax (method '(GET HEAD)) (use-sxml not-set) use-sessionprocedure
Define two awful pages:
- The "client page" that is accessed via path and presents contents. It is a "normal" awful page and should be used as the link presented to the client;
- The "server page" that should be accessed by the "client page" via sse-path using the appropiate Javascript code (see Examples section). This page will run sse-proc.
Note that sse-proc should keep the connection open, so usually it is an infinite loop. In order to avoid CPU consumption this loop should sleep some seconds and, for that, be sure to use SRFI-18 thread-sleep! instead of blocking sleep procedure.